Skip to content

Commit

Permalink
try waiting for connection state
Browse files Browse the repository at this point in the history
  • Loading branch information
terencecho committed Mar 30, 2022
1 parent 2e90a21 commit 6cb3181
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1153,11 +1153,15 @@ public void testCancelSyncWhenCancelledWhenWorkerIsNotRunning() throws Exception
}

@Test
@Order(22)
@Order(-3)
@DisabledIfEnvironmentVariable(named = "KUBE",
matches = "true")
public void testActionsWhenTemporalIsInTerminalState() throws Exception {
final WorkflowServiceStubs temporalService = TemporalUtils.createTemporalService("localhost:7233");
String temporalHost = "localhost:7233";
if (!USE_EXTERNAL_DEPLOYMENT) {
temporalHost = "airbyte-temporal:7233";
}
final WorkflowServiceStubs temporalService = TemporalUtils.createTemporalService(temporalHost);
final WorkflowClient workflowCLient = WorkflowClient.newInstance(temporalService);

final String connectionName = "test-connection";
Expand All @@ -1172,8 +1176,11 @@ public void testActionsWhenTemporalIsInTerminalState() throws Exception {
.cursorField(List.of(COLUMN_ID))
.destinationSyncMode(destinationSyncMode)
.primaryKey(List.of(List.of(COLUMN_NAME))));

final UUID connectionId =
createConnection(connectionName, sourceId, destinationId, List.of(operationId), catalog, null).getConnectionId();
waitForConnectionState(apiClient, connectionId);

// check if temporal workflow is reachable
final ConnectionManagerWorkflow connectionManagerWorkflow =
workflowCLient.newWorkflowStub(ConnectionManagerWorkflow.class, "connection_manager_" + connectionId);
Expand Down

0 comments on commit 6cb3181

Please sign in to comment.