]> arthur.barton.de Git - bup.git/commitdiff
test_server_split_with_indexes: close packwriter
authorRob Browning <rlb@defaultvalue.org>
Sat, 26 Mar 2016 23:40:57 +0000 (18:40 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sat, 26 Mar 2016 23:41:00 +0000 (18:41 -0500)
Otherwise there are random test failures when the tmpdir is removed
before the PackWriter's destructor calls close().  This doesn't cause an
immediate problem, but it adds an unexpected entry to saved_errors that
causes later tests to fail.

The related saved_errors entries looked like this:

  ['../../../bup', 'midx', '--auto', '--dir', ...]: returned 15

and the underlying (hidden) midx stderr output in that case looked like
this:

  error: '...' is not a bup repository; run "bup init"

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/t/tclient.py

index 0db5cc1d59fa5e0a61c138a3e886b63667a4857c..fdc3e3a06f36069bcf89bae2d506f95e92199fbd 100644 (file)
@@ -35,6 +35,7 @@ def test_server_split_with_indexes():
     rw.new_blob(s2)
     rw.breakpoint()
     rw.new_blob(s1)
+    rw.close()
     if wvfailure_count() == initial_failures:
         subprocess.call(['rm', '-rf', tmpdir])