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.

This commit is contained in:
A.J. Beamon 2018-03-19 15:47:56 -07:00
parent b34cd5cab4
commit af738e0f45
2 changed files with 3 additions and 3 deletions

View File

@ -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)
]

View File

@ -75,7 +75,7 @@ class HighContentionAllocator (object):
count = tr.snapshot[self.counters[start]]
if count != None:
count = struct.unpack("<q", str(count))[0]
count = struct.unpack("<q", bytes(count))[0]
else:
count = 0