Skip to content

Commit

Permalink
see RunID run
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Jan 9, 2025
1 parent 70c2b93 commit 10b0142
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flow/e2e/clickhouse/peer_flow_ch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func (s ClickHouseSuite) Test_Addition_Removal() {
return !rows.Next()
})

runID := e2e.EnvGetRunID(s.t, env)
e2e.SignalWorkflow(env, model.CDCDynamicPropertiesSignal, &protos.CDCFlowConfigUpdate{
AdditionalTables: []*protos.TableMapping{
{
Expand All @@ -123,6 +124,8 @@ func (s ClickHouseSuite) Test_Addition_Removal() {
flowStatus := getFlowStatus()
return flowStatus == protos.FlowStatus_STATUS_RUNNING
})
afterAddRunID := e2e.EnvGetRunID(s.t, env)
require.NotEqual(s.t, runID, afterAddRunID)

_, err = s.Conn().Exec(context.Background(), fmt.Sprintf(`
INSERT INTO %s (key) VALUES ('test');
Expand Down Expand Up @@ -163,6 +166,8 @@ func (s ClickHouseSuite) Test_Addition_Removal() {
flowStatus := getFlowStatus()
return flowStatus == protos.FlowStatus_STATUS_RUNNING
})
afterRemoveRunID := e2e.EnvGetRunID(s.t, env)
require.NotEqual(s.t, runID, afterRemoveRunID)

_, err = s.Conn().Exec(context.Background(), fmt.Sprintf(`
INSERT INTO %s (key) VALUES ('test');
Expand Down
6 changes: 6 additions & 0 deletions flow/e2e/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,12 @@ func EnvGetWorkflowState(t *testing.T, env WorkflowRun) peerflow.CDCFlowWorkflow
return state
}

func EnvGetRunID(t *testing.T, env WorkflowRun) string {

Check failure on line 730 in flow/e2e/test_utils.go

View workflow job for this annotation

GitHub Actions / lint

test helper function should start from t.Helper() (thelper)
execData, err := env.c.DescribeWorkflowExecution(context.Background(), env.GetID(), "")
require.NoError(t, err)
return execData.WorkflowExecutionInfo.Execution.RunId
}

func EnvGetFlowStatus(t *testing.T, env WorkflowRun) protos.FlowStatus {
t.Helper()
var flowStatus protos.FlowStatus
Expand Down

0 comments on commit 10b0142

Please sign in to comment.