mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
kvutils: Print state updates before and after normalization. (#11096)
On integrity check failure. This makes it easier to debug failures, as normalization can make the state update mostly useless. CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
be216aa872
commit
d64d965230
@ -89,15 +89,31 @@ object ReadServiceStateUpdateComparison {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (expectedNormalizedUpdate != actualNormalizedUpdate) {
|
if (expectedNormalizedUpdate != actualNormalizedUpdate) {
|
||||||
Future.failed(
|
if (expectedNormalizedUpdate == expectedUpdate && actualNormalizedUpdate == actualUpdate) {
|
||||||
new ComparisonFailureException(
|
Future.failed(
|
||||||
"State update mismatch.",
|
new ComparisonFailureException(
|
||||||
"Expected:",
|
"State update mismatch.",
|
||||||
expectedNormalizedUpdate.toString,
|
"Expected:",
|
||||||
"Actual:",
|
expectedNormalizedUpdate.toString,
|
||||||
actualNormalizedUpdate.toString,
|
"Actual:",
|
||||||
|
actualNormalizedUpdate.toString,
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
} else {
|
||||||
|
Future.failed(
|
||||||
|
new ComparisonFailureException(
|
||||||
|
"State update mismatch.",
|
||||||
|
"Expected (before normalization):",
|
||||||
|
expectedUpdate.toString,
|
||||||
|
"Expected (after normalization):",
|
||||||
|
expectedNormalizedUpdate.toString,
|
||||||
|
"Actual (before normalization):",
|
||||||
|
actualUpdate.toString,
|
||||||
|
"Actual (after normalization):",
|
||||||
|
actualNormalizedUpdate.toString,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Future.unit
|
Future.unit
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user