diff --git a/jobsdb/integration_test.go b/jobsdb/integration_test.go index f46fc91e4bf..a478e82f05b 100644 --- a/jobsdb/integration_test.go +++ b/jobsdb/integration_test.go @@ -732,12 +732,6 @@ func TestJobsDB(t *testing.T) { require.EqualValues(t, 2, len(jobDBInspector.DSIndicesList())) require.EqualValues(t, 2, jobDB.GetMaxDSIndex()) - // time.Sleep(time.Second * 2) // wait for some time to pass - // triggerAddNewDS <- time.Now() // trigger addNewDSLoop to run - // triggerAddNewDS <- time.Now() // Second time, waits for the first loop to finish - - // require.EqualValues(t, 3, len(jobDBInspector.DSIndicesList())) - // require.EqualValues(t, 3, jobDB.GetMaxDSIndex()) time.Sleep(time.Second * 2) // wait for some time to pass so that retention condition satisfies @@ -745,9 +739,9 @@ func TestJobsDB(t *testing.T) { triggerMigrateDS <- time.Now() // Second time, waits for the first loop to finish dsIndicesList := jobDBInspector.DSIndicesList() + require.EqualValues(t, 2, len(jobDBInspector.DSIndicesList())) require.EqualValues(t, "1_1", dsIndicesList[0]) require.EqualValues(t, "2", dsIndicesList[1]) - require.EqualValues(t, 2, len(jobDBInspector.DSIndicesList())) require.EqualValues(t, 2, jobDB.GetMaxDSIndex()) // only non-terminal jobs should be migrated