You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require.Equalf(t, 0, ec, "rudder-server exited with a non-0 exit code: %d", ec)
190
188
close(svcDone)
191
189
}()
192
190
health.WaitUntilReady(ctx, t,
@@ -197,12 +195,17 @@ func ArchivalScenario(
197
195
)
198
196
t.Logf("Rudder server started")
199
197
200
-
g, _:=errgroup.WithContext(ctx)
198
+
g:= errgroup.Group{}
201
199
g.Go(func() error {
202
200
t.Logf("Waiting for all gw jobs to be successfully processed")
203
201
require.Eventually(t, func() bool {
204
202
varprocessedJobCountint
205
-
require.NoError(t, postgresContainer.DB.QueryRow("SELECT count(*) FROM unionjobsdbmetadata('gw',20) WHERE job_state = 'succeeded'").Scan(&processedJobCount))
203
+
row:=postgresContainer.DB.QueryRow("SELECT count(*) FROM unionjobsdbmetadata('gw',20) WHERE job_state = 'succeeded'")
204
+
err:=row.Scan(&processedJobCount)
205
+
iferr!=nil {
206
+
t.Logf("processedJobCount: failed to scan the row: %v", err)
207
+
returnfalse
208
+
}
206
209
returnprocessedJobCount==numJobs
207
210
}, 5*time.Minute, 1*time.Second, "all gw jobs should be successfully processed")
208
211
returnnil
@@ -211,7 +214,12 @@ func ArchivalScenario(
211
214
g.Go(func() error {
212
215
require.Eventually(t, func() bool {
213
216
vararchivedJobCountint
214
-
require.NoError(t, postgresContainer.DB.QueryRow("SELECT count(*) FROM unionjobsdbmetadata('arc',20) WHERE job_state = 'succeeded'").Scan(&archivedJobCount))
217
+
row:=postgresContainer.DB.QueryRow("SELECT count(*) FROM unionjobsdbmetadata('arc',20) WHERE job_state = 'succeeded'")
218
+
err:=row.Scan(&archivedJobCount)
219
+
iferr!=nil {
220
+
t.Logf("archivedJobCount: failed to scan the row: %v", err)
221
+
returnfalse
222
+
}
215
223
returnarchivedJobCount==numJobs
216
224
}, 5*time.Minute, 1*time.Second, "all jobs should be successfully archived")
0 commit comments