Skip to content

Commit

Permalink
chore: re-configure blocking runtime
Browse files Browse the repository at this point in the history
Include thread name and adjust number of workers
  • Loading branch information
DDtKey committed Jul 7, 2024
1 parent f79ed70 commit 6a4b5c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion testcontainers/src/runners/sync_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ fn lazy_sync_runner() -> Result<Arc<tokio::runtime::Runtime>> {
// we need to use multi-thread runtime,
// because we may spawn background tasks that must keep running regardless of `block_on` calls
tokio::runtime::Builder::new_multi_thread()
.thread_name("testcontainers-worker")
.worker_threads(2)
.enable_all()
.build()?,
);
Expand Down Expand Up @@ -96,7 +98,7 @@ mod tests {
fn runtime() -> &'static Runtime {
RUNTIME.get_or_init(|| {
tokio::runtime::Builder::new_multi_thread()
.thread_name("testcontainers-worker")
.thread_name("testcontainers-test")
.worker_threads(2)
.enable_all()
.build()
Expand Down

0 comments on commit 6a4b5c7

Please sign in to comment.