aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/jobqueue.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-10-06 10:18:49 +0200
committerGitHub Enterprise <[email protected]>2025-10-06 10:18:49 +0200
commitd5b2a263e6d4c893c6ec3fb99b36110630da6529 (patch)
tree35bfa4c23c838fdbebd07100db2ebf2404977b3f /src/zencore/jobqueue.cpp
parentfix link error with operator new (#553) (diff)
downloadzen-d5b2a263e6d4c893c6ec3fb99b36110630da6529.tar.xz
zen-d5b2a263e6d4c893c6ec3fb99b36110630da6529.zip
speed up tests (#555)
* faster FileSystemTraversal test * faster jobqueue test * faster NamedEvent test * faster cache tests * faster basic http tests * faster blockstore test * faster cache store tests * faster compactcas tests * more responsive zenserver launch * tweak worker pool sizes in tests
Diffstat (limited to 'src/zencore/jobqueue.cpp')
-rw-r--r--src/zencore/jobqueue.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/zencore/jobqueue.cpp b/src/zencore/jobqueue.cpp
index 4aa8c113e..bd391909d 100644
--- a/src/zencore/jobqueue.cpp
+++ b/src/zencore/jobqueue.cpp
@@ -465,7 +465,7 @@ TEST_CASE("JobQueue")
std::unique_ptr<JobQueue> Queue(MakeJobQueue(2, "queue"));
WorkerThreadPool Pool(4);
Latch JobsLatch(1);
- for (uint32_t I = 0; I < 100; I++)
+ for (uint32_t I = 0; I < 32; I++)
{
JobsLatch.AddCount(1);
Pool.ScheduleWork(
@@ -479,7 +479,7 @@ TEST_CASE("JobQueue")
return;
}
Context.ReportProgress("going to sleep", "", 100, 100);
- Sleep(10);
+ Sleep(5);
if (Context.IsCancelled())
{
return;
@@ -489,7 +489,7 @@ TEST_CASE("JobQueue")
{
zen::ThrowSystemError(8, fmt::format("Job {} forced to fail", I));
}
- Sleep(10);
+ Sleep(5);
if (Context.IsCancelled())
{
return;
@@ -575,7 +575,7 @@ TEST_CASE("JobQueue")
RemainingJobs.size(),
PendingCount,
RemainingJobs.size() - PendingCount);
- Sleep(100);
+ Sleep(5);
}
JobsLatch.Wait();
}