Commit f1f95d3e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6364dc14
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
"""test wcfs filesystem from outside as python client process""" """test wcfs filesystem from outside as python client process"""
from wendelin.lib.testing import getTestDB from wendelin.lib.testing import getTestDB
from wendelin.lib.zodb import dbclose
from wendelin.lib.mem import memcpy from wendelin.lib.mem import memcpy
from wendelin.bigfile.file_zodb import ZBigFile from wendelin.bigfile.file_zodb import ZBigFile
from wendelin.bigfile.tests.test_filezodb import blksize from wendelin.bigfile.tests.test_filezodb import blksize
...@@ -31,6 +32,8 @@ from persistent.timestamp import TimeStamp ...@@ -31,6 +32,8 @@ from persistent.timestamp import TimeStamp
import os, os.path, subprocess import os, os.path, subprocess
from errno import EINVAL from errno import EINVAL
from time import sleep
from golang import func, defer
from pytest import raises from pytest import raises
testdb = None testdb = None
...@@ -120,8 +123,11 @@ def test_join_autostart(): ...@@ -120,8 +123,11 @@ def test_join_autostart():
# XXX parametrize zblk0, zblk1 # XXX parametrize zblk0, zblk1
# XXX select !wcfs mode so that we prepare data through !wcfs path. # XXX select !wcfs mode so that we prepare data through !wcfs path.
@func
def test_bigfile_empty(): def test_bigfile_empty():
root = testdb.dbopen() root = testdb.dbopen()
defer(lambda: dbclose(root))
root['zfile'] = f = ZBigFile(blksize) root['zfile'] = f = ZBigFile(blksize)
# NOTE there is no clean way to retrieve tid of just committed transaction # NOTE there is no clean way to retrieve tid of just committed transaction
...@@ -137,6 +143,7 @@ def test_bigfile_empty(): ...@@ -137,6 +143,7 @@ def test_bigfile_empty():
assert tidtime(tid2) > tidtime(tid1) assert tidtime(tid2) > tidtime(tid1)
wc = wcfs.join(testzurl, autostart=True) wc = wcfs.join(testzurl, autostart=True)
defer(wc.close)
# path to bigfile/ under wcfs # path to bigfile/ under wcfs
bigpath = wc.mountpoint + "/bigfile" bigpath = wc.mountpoint + "/bigfile"
...@@ -189,9 +196,4 @@ def test_bigfile_empty(): ...@@ -189,9 +196,4 @@ def test_bigfile_empty():
wc.close()
# TODO pagecache state after loading (via mincore) # TODO pagecache state after loading (via mincore)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment