diff --git a/l2gersync/e2e_test.go b/l2gersync/e2e_test.go index 934d6a206..7ac9684cb 100644 --- a/l2gersync/e2e_test.go +++ b/l2gersync/e2e_test.go @@ -22,14 +22,12 @@ const ( maxRetryAttemptsAfterError = 10 waitForNewBlocksPeriod = 30 * time.Millisecond syncBlockChunkSize = 10 - testIterations = 3 - syncDelay = 1 * time.Second + testIterations = 5 + syncDelay = 500 * time.Millisecond ) func TestL2GERSyncE2E(t *testing.T) { t.Parallel() - t.Skip("Skipping E2E test, this test is broken and needs a PR to be fixed. The lastProcessedBlock doesn't take in account empty blocks") - ctx, _ := context.WithTimeout(context.Background(), 30*time.Minute) l1Setup, l2Setup := helpers.NewSimulatedEVMEnvironment(t, helpers.DefaultEnvironmentConfig(helpers.SovereignChainL2GERContract)) @@ -56,15 +54,12 @@ func TestL2GERSyncE2E(t *testing.T) { for i := range testIterations { updateL1GlobalExitRoot(t, l1Setup, i) - time.Sleep(15 * syncDelay) testGERSyncer(t, ctx, l1Setup, l2Setup, syncer, i) } } func TestL2GERSync_GERRemoval(t *testing.T) { t.Parallel() - t.Skip("Skipping E2E test, this test is broken and needs a PR to be fixed. The lastProcessedBlock doesn't take in account empty blocks") - ctx := t.Context() l1Environment, l2Environment := helpers.NewSimulatedEVMEnvironment(t, helpers.DefaultEnvironmentConfig(helpers.SovereignChainL2GERContract)) @@ -92,7 +87,6 @@ func TestL2GERSync_GERRemoval(t *testing.T) { for i := range testIterations { ger := updateL1GlobalExitRoot(t, l1Environment, i) updatedGERs = append(updatedGERs, ger) - time.Sleep(syncDelay) testGERSyncer(t, ctx, l1Environment, l2Environment, syncer, i) } @@ -127,8 +121,6 @@ func TestL2GERSync_GERRemoval(t *testing.T) { func TestL2GERSync_IndexLegacyGERManagerSC(t *testing.T) { t.Parallel() - t.Skip("Skipping E2E test, this test is broken and needs a PR to be fixed. The lastProcessedBlock doesn't take in account empty blocks") - ctx := context.Background() l1Setup, l2Setup := helpers.NewSimulatedEVMEnvironment(t, helpers.DefaultEnvironmentConfig(helpers.LegacyL2GERContract)) @@ -161,9 +153,9 @@ func TestL2GERSync_IndexLegacyGERManagerSC(t *testing.T) { time.Sleep(syncDelay) } - l1Setup.SimBackend.Commit() - l2Setup.SimBackend.Commit() - time.Sleep(1 * time.Second) + // l1Setup.SimBackend.Commit() + // l2Setup.SimBackend.Commit() + // time.Sleep(1 * time.Second) endBlockNumber, err := l2Setup.SimBackend.Client().BlockNumber(ctx) require.NoError(t, err) @@ -214,7 +206,7 @@ func testGERSyncer(t *testing.T, ctx context.Context, l1Setup *helpers.L1Environment, l2Setup *helpers.L2Environment, syncer *l2gersync.L2GERSync, i int) { t.Helper() - time.Sleep(2 * time.Second) + time.Sleep(500 * time.Millisecond) expectedGER, err := l1Setup.GERContract.GetLastGlobalExitRoot(&bind.CallOpts{Pending: false}) require.NoError(t, err)