configdb: Fix ConfigIncrementWorkload ConfigDatabaseUnitTests to use tuple instead of binary reader

This commit is contained in:
Kevin Hoxha 2022-10-10 14:27:08 -07:00 committed by Lukas Joswiak
parent 2f898fb006
commit 6c62ff3cf8
2 changed files with 3 additions and 2 deletions

View File

@ -344,7 +344,7 @@ class TransactionEnvironment {
state Key configKey = encodeConfigKey(configClass, knobName); state Key configKey = encodeConfigKey(configClass, knobName);
state Optional<Value> value = wait(tr->get(configKey)); state Optional<Value> value = wait(tr->get(configKey));
if (expected.present()) { if (expected.present()) {
ASSERT_EQ(BinaryReader::fromStringRef<int64_t>(value.get(), Unversioned()), expected.get()); ASSERT_EQ(Tuple::unpack(value.get()).getInt(0), expected.get());
} else { } else {
ASSERT(!value.present()); ASSERT(!value.present());
} }

View File

@ -44,7 +44,8 @@ class ConfigIncrementWorkload : public TestWorkload {
if (!serializedValue.present()) { if (!serializedValue.present()) {
return 0; return 0;
} else { } else {
int value = BinaryReader::fromStringRef<int>(serializedValue.get(), Unversioned()); Tuple t = Tuple::unpack(serializedValue.get());
int value = t.getInt(0);
te.detail("Value", value); te.detail("Value", value);
return value; return value;
} }