Skip to content

Commit

Permalink
Try keeping the node dir in /tmp with separate NODE_DB
Browse files Browse the repository at this point in the history
With previous commit, the NODE_DB should actually be set.

IIRC we cannot store the socket file in the directory that gets cached,
without breaking CI, so let's keep the node dir in /tmp.
  • Loading branch information
Anviking committed Oct 16, 2020
1 parent bd57508 commit c2182b0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/core-integration/src/Cardano/Wallet/BenchShared.hs
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,10 @@ execBenchWithNode networkConfig action = do

withNetworkConfiguration :: RestoreBenchArgs -> (CardanoNodeConfig -> IO a) -> IO a
withNetworkConfiguration args action = do
-- Temporary directory for storing socket and node database
let withNodeDir cb = case argNodeDatabaseDir args of
Nothing -> withSystemTempDirectory "cw-node" cb
Just d -> do
createDirectoryIfMissing True d
cb d

let networkDir = argsNetworkDir args
port <- fromIntegral <$> getRandomPort
withNodeDir $ \dir -> action CardanoNodeConfig
-- Temporary directory for storing socket
withSystemTempDirectory "cw-node" $ \dir -> action CardanoNodeConfig
{ nodeDir = dir
, nodeConfigFile = networkDir </> "configuration.json"
, nodeDatabaseDir = fromMaybe "db" (argNodeDatabaseDir args)
Expand Down

0 comments on commit c2182b0

Please sign in to comment.