Skip to content

Commit

Permalink
Log errors polling status
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Mar 4, 2024
1 parent a19df84 commit 9451d8e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions flow/e2e/postgres/qrep_flow_pg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,21 +360,29 @@ func (s PeerFlowE2ETestSuitePG) Test_Pause() {
e2e.EnvWaitFor(s.t, env, time.Minute, "pausing", func() bool {
response, err := env.Query(shared.QRepFlowStateQuery)
if err != nil {
s.t.Log(err)
return false
}
var state peerflow.CDCFlowWorkflowState
err = response.Get(&state)
return err != nil && state.CurrentFlowStatus == protos.FlowStatus_STATUS_PAUSED
if err != nil {
s.t.Fatal("decode failed", err)
}
return state.CurrentFlowStatus == protos.FlowStatus_STATUS_PAUSED
})
e2e.SignalWorkflow(env, model.FlowSignal, model.NoopSignal)
e2e.EnvWaitFor(s.t, env, time.Minute, "unpausing", func() bool {
response, err := env.Query(shared.QRepFlowStateQuery)
if err != nil {
s.t.Log(err)
return false
}
var state peerflow.CDCFlowWorkflowState
err = response.Get(&state)
return err != nil && state.CurrentFlowStatus == protos.FlowStatus_STATUS_RUNNING
if err != nil {
s.t.Fatal("decode failed", err)
}
return state.CurrentFlowStatus == protos.FlowStatus_STATUS_RUNNING
})

env.Cancel()
Expand Down

0 comments on commit 9451d8e

Please sign in to comment.