Skip to content

Commit 7bb3a0f

Browse files
committed
Add e2e test
Signed-off-by: Matt Lord <mattalord@gmail.com>
1 parent a541bad commit 7bb3a0f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

go/test/endtoend/vreplication/helper_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,12 @@ func waitForNoWorkflowLag(t *testing.T, vc *VitessCluster, keyspace, worfklow st
158158
timer := time.NewTimer(defaultTimeout)
159159
defer timer.Stop()
160160
for {
161-
output, err := vc.VtctlClient.ExecuteCommandWithOutput("Workflow", "--", ksWorkflow, "show")
162-
require.NoError(t, err)
163-
lag, err = jsonparser.GetInt([]byte(output), "MaxVReplicationTransactionLag")
161+
// We don't need log records for this so pass --include-logs=false.
162+
output, err := vc.VtctldClient.ExecuteCommandWithOutput("workflow", "--keyspace", keyspace, "show", "--workflow", worfklow, "--include-logs=false")
164163
require.NoError(t, err)
164+
// Confirm that we got no log records back.
165+
require.Equal(t, 0, len(gjson.Get(output, "workflows.0.shard_streams.*.streams.0.logs").Array()), "workflow %q returned log records when we expected none", ksWorkflow)
166+
lag = gjson.Get(output, "workflows.0.max_v_replication_lag").Int()
165167
if lag == 0 {
166168
return
167169
}

0 commit comments

Comments
 (0)