File tree Expand file tree Collapse file tree
packages/testcontainers/src/reaper Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { ContainerInfo } from "dockerode" ;
22import { Socket } from "net" ;
3+ import { userInfo } from "os" ;
34import { IntervalRetry , log , RandomUuid , withFileLock } from "../common" ;
45import { ContainerRuntimeClient , ImageName } from "../container-runtime" ;
56import { GenericContainer } from "../generic-container/generic-container" ;
@@ -28,7 +29,8 @@ export async function getReaper(client: ContainerRuntimeClient): Promise<Reaper>
2829 return reaper ;
2930 }
3031
31- reaper = await withFileLock ( "testcontainers-node.lock" , async ( ) => {
32+ const userId = userInfo ( ) . uid ;
33+ reaper = await withFileLock ( `testcontainers-node-${ userId } .lock` , async ( ) => {
3234 const reaperContainers = await findReaperContainers ( client ) ;
3335
3436 if ( process . env . TESTCONTAINERS_RYUK_DISABLED === "true" ) {
You can’t perform that action at this time.
0 commit comments