From c7bf685c325f944029226351fe6de6bd6cc2ceb8 Mon Sep 17 00:00:00 2001 From: pg9182 <96569817+pg9182@users.noreply.github.com> Date: Sat, 4 Mar 2023 01:04:50 -0500 Subject: pkg/api/api0/api0testutil: Reduce db stress test concurrency on non-Linux GitHub Actions workers have gotten noticeably slower, making the tests much flakier (especially on Windows). And, our main target is Linux anyways. --- pkg/api/api0/api0testutil/storage.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/api/api0/api0testutil/storage.go b/pkg/api/api0/api0testutil/storage.go index a32de6d..78c123e 100644 --- a/pkg/api/api0/api0testutil/storage.go +++ b/pkg/api/api0/api0testutil/storage.go @@ -180,7 +180,9 @@ func TestAccountStorage(t *testing.T, s api0.AccountStorage) { users uint64 = 16384 ) if runtime.GOOS != "linux" { - concurrency = 16 // doesn't perform as well for database locking, and it's not our primary target anyways + // doesn't perform as well for database locking (esp Windows), and it's not our primary target anyways + concurrency /= 4 + users /= 4 } var wg sync.WaitGroup var fail atomic.Int32 @@ -512,7 +514,9 @@ func TestPdataStorage(t *testing.T, s api0.PdataStorage) { users uint64 = 16384 ) if runtime.GOOS != "linux" { - concurrency = 16 // doesn't perform as well for database locking, and it's not our primary target anyways + // doesn't perform as well for database locking (esp Windows), and it's not our primary target anyways + concurrency /= 4 + users /= 4 } var wg sync.WaitGroup var fail atomic.Int32 -- cgit v1.2.3