hlb, fix bug where sandbox is not being run on a dynamically allocated port (#2428)

This commit is contained in:
nickchapman-da 2019-08-07 11:16:53 +01:00 committed by GitHub
parent a15256571a
commit 2b1204ceac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ data Sandbox = Sandbox { port :: Port, proh :: ProcessHandle }
sandboxProcess :: SandboxSpec -> FilePath -> IO CreateProcess
sandboxProcess SandboxSpec{dar} portFile = do
binary <- locateRunfiles (mainWorkspace </> exe "ledger/sandbox/sandbox-binary")
pure $ proc binary [ dar, "--port-file", portFile]
pure $ proc binary [ dar, "--port-file", portFile, "-p", "0"]
startSandboxProcess :: SandboxSpec -> FilePath -> IO (ProcessHandle,Maybe Handle)
startSandboxProcess spec portFile = withDevNull $ \devNull -> do