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 640370f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flow/e2e/clickhouse/peer_flow_ch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,14 @@ func (s ClickHouseSuite) Test_Addition_Removal() {
`, srcTableName))
require.NoError(s.t, err)
e2e.EnvWaitForEqualTablesWithNames(env, s, "first insert", "test_table_add_remove", dstTableName, "id,key")
runID := env.GetRunID()
e2e.SignalWorkflow(env, model.FlowSignal, model.PauseSignal)
e2e.EnvWaitFor(s.t, env, 4*time.Minute, "pausing for add table", func() bool {
flowStatus := getFlowStatus()
return flowStatus == protos.FlowStatus_STATUS_PAUSED
})
pausedRunID := env.GetRunID()
require.NotEqual(s.t, runID, pausedRunID)

_, err = s.Conn().Exec(context.Background(),
`SELECT pg_terminate_backend(pid) FROM pg_stat_activity
Expand Down Expand Up @@ -123,6 +126,8 @@ func (s ClickHouseSuite) Test_Addition_Removal() {
flowStatus := getFlowStatus()
return flowStatus == protos.FlowStatus_STATUS_RUNNING
})
afterAddRunID := env.GetRunID()
require.NotEqual(s.t, pausedRunID, afterAddRunID)

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

_, err = s.Conn().Exec(context.Background(), fmt.Sprintf(`
INSERT INTO %s (key) VALUES ('test');
Expand Down

0 comments on commit 640370f

Please sign in to comment.