From af738e0f4556623514c7b80d5827f33e5396c523 Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Mon, 19 Mar 2018 15:47:56 -0700 Subject: [PATCH] Fix Python3 directory layer bug where str() was used instead of bytes(). Fix bug in binding tester that caused directory tests to not compare results, which resulted in the directory layer bug going undetected. --- bindings/bindingtester/tests/directory.py | 4 ++-- bindings/python/fdb/directory_impl.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/bindingtester/tests/directory.py b/bindings/bindingtester/tests/directory.py index e84db7980c..861ca93972 100644 --- a/bindings/bindingtester/tests/directory.py +++ b/bindings/bindingtester/tests/directory.py @@ -340,9 +340,9 @@ class DirectoryTest(Test): # errors += directory_util.check_for_duplicate_prefixes(db, self.prefix_log) return errors - def get_result_specfications(self): + def get_result_specifications(self): return [ - ResultSpecification(self.stack, key_start_index=1, ordering_index=1), + ResultSpecification(self.stack_subspace, key_start_index=1, ordering_index=1), ResultSpecification(self.directory_log, ordering_index=0), ResultSpecification(self.subspace_log, ordering_index=0) ] diff --git a/bindings/python/fdb/directory_impl.py b/bindings/python/fdb/directory_impl.py index 2a1292c861..f8c4f8d89d 100755 --- a/bindings/python/fdb/directory_impl.py +++ b/bindings/python/fdb/directory_impl.py @@ -75,7 +75,7 @@ class HighContentionAllocator (object): count = tr.snapshot[self.counters[start]] if count != None: - count = struct.unpack("