configdb: Fix ConfigIncrementWorkload ConfigDatabaseUnitTests to use tuple instead of binary reader
This commit is contained in:
parent
2f898fb006
commit
6c62ff3cf8
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue