mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02:00
qa: Windows fixups for functional tests
This commit is contained in:
@@ -107,13 +107,13 @@ class MempoolPersistTest(BitcoinTestFramework):
|
||||
wait_until(lambda: len(self.nodes[1].getrawmempool()) == 5)
|
||||
|
||||
self.log.debug("Prevent bitcoind from writing mempool.dat to disk. Verify that `savemempool` fails")
|
||||
# to test the exception we are setting bad permissions on a tmp file called mempool.dat.new
|
||||
# to test the exception we are creating a tmp folder called mempool.dat.new
|
||||
# which is an implementation detail that could change and break this test
|
||||
mempooldotnew1 = mempooldat1 + '.new'
|
||||
with os.fdopen(os.open(mempooldotnew1, os.O_CREAT, 0o000), 'w'):
|
||||
pass
|
||||
os.mkdir(mempooldotnew1)
|
||||
assert_raises_rpc_error(-1, "Unable to dump mempool to disk", self.nodes[1].savemempool)
|
||||
os.remove(mempooldotnew1)
|
||||
os.rmdir(mempooldotnew1)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
MempoolPersistTest().main()
|
||||
|
Reference in New Issue
Block a user