Resolve sanbox server port conflict by adding file lock to sync all SandboxWorker.init() methods, so one available port won't be used twice between testcases.
Before add global file lock, two sanboxServer may detecte one port as available in calling SandboxWorker.defaultConfig() before they runing their local nodes with the port as a params in calling SandboxServer.start() in:
So, I added a file lock to preotect instruction from const defaultConfig = await this.defaultConfig() to await worker.server.start() to avoid available ports conflict between testfiles
https://github.com/near/near-workspaces-js/issues/220
Resolve sanbox server port conflict by adding file lock to sync all
SandboxWorker.init()
methods, so one available port won't be used twice between testcases. Before add global file lock, two sanboxServer may detecte one port as available in callingSandboxWorker.defaultConfig()
before they runing their local nodes with the port as a params in callingSandboxServer.start()
in:Now, I add the file lock to
So, I added a file lock to preotect instruction from
const defaultConfig = await this.defaultConfig()
toawait worker.server.start()
to avoidavailable
ports conflict between testfiles