Skip to content

Commit

Permalink
Fix ActivityMetadataTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Quinn-With-Two-Ns committed Nov 4, 2024
1 parent 0253534 commit 8f93222
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
import static org.junit.Assume.assumeTrue;

import io.temporal.activity.ActivityOptions;
import io.temporal.api.common.v1.WorkflowExecution;
import io.temporal.api.history.v1.HistoryEvent;
import io.temporal.client.WorkflowStub;
import io.temporal.common.WorkflowExecutionHistory;
import io.temporal.common.converter.DefaultDataConverter;
import io.temporal.testing.internal.SDKTestWorkflowRule;
Expand Down Expand Up @@ -57,11 +59,11 @@ public void checkRealServer() {
@Test
public void testActivityWithMetaData() {
TestWorkflow1 stub = testWorkflowRule.newWorkflowStubTimeoutOptions(TestWorkflow1.class);
stub.execute(testWorkflowRule.getTaskQueue());

String workflowId = stub.execute(testWorkflowRule.getTaskQueue());

WorkflowExecution exec = WorkflowStub.fromTyped(stub).getExecution();
WorkflowExecutionHistory workflowExecutionHistory =
testWorkflowRule.getWorkflowClient().fetchHistory(workflowId);
testWorkflowRule.getWorkflowClient().fetchHistory(exec.getWorkflowId());
List<HistoryEvent> activityScheduledEvents =
workflowExecutionHistory.getEvents().stream()
.filter(HistoryEvent::hasActivityTaskScheduledEventAttributes)
Expand Down

0 comments on commit 8f93222

Please sign in to comment.