qa: Windows fixups for functional tests

This commit is contained in:
MarcoFalke committed 2018-04-08 12:44:43 -04:00
1 parent 15c3bb4268
commit fab9095d40
2 files changed
+7 -7

No files matched your search

+4 -4
View File
@@ -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()