From ae4f2502f443c7bb5ff09012e521bf0bbaacf9bc Mon Sep 17 00:00:00 2001 From: aya Date: Thu, 13 Mar 2025 11:29:03 +0200 Subject: [PATCH] Modify test assertion --- .github/workflows/CI.yml | 2 +- waku/stress_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a895060..23f94d6 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -40,7 +40,7 @@ jobs: - name: Run Endurance Test run: | # Increase timeout so long-running tests won't kill the job prematurely - go test -v ./waku -count=1 -timeout=300m -run Test2Nodes1kTearDown ./... | tee testlogs.log + go test -v ./waku -count=1 -timeout=300m -run Test2Nodes500IterationTearDown ./... | tee testlogs.log - name: Upload Test Logs uses: actions/upload-artifact@v4 diff --git a/waku/stress_test.go b/waku/stress_test.go index 86ff118..c357ad6 100644 --- a/waku/stress_test.go +++ b/waku/stress_test.go @@ -79,7 +79,7 @@ func TestMemoryUsageForThreeNodes(t *testing.T) { Debug("[%s] Test completed successfully", testName) } -func Test2Nodes1kTearDown(t *testing.T) { +func Test2Nodes500IterationTearDown(t *testing.T) { logFile, err := os.OpenFile("test_repeated_start_stop.log", os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0666) require.NoError(t, err) defer logFile.Close() @@ -98,7 +98,7 @@ func Test2Nodes1kTearDown(t *testing.T) { require.NoError(t, err) Debug("[%s] OS-level RSS at test START: %d KB", t.Name(), initialRSS) - totalIterations := 501 + totalIterations := 500 for i := 1; i <= totalIterations; i++ { var nodes []*WakuNode for n := 1; n <= 2; n++ { @@ -134,7 +134,7 @@ func Test2Nodes1kTearDown(t *testing.T) { rssNow, err := getRSSKB() require.NoError(t, err) Debug("Iteration %d, OS-level RSS after teardown: %d KB", i, rssNow) - require.LessOrEqual(t, rssNow, initialRSS*3, "OS-level RSS soared above threshold after iteration %d", i) + require.LessOrEqual(t, rssNow, initialRSS*10, "OS-level RSS soared above threshold after iteration %d", i) } Debug("Iteration numberrrrrr %d", i) }