Skip to content

Commit 5c9c6f0

Browse files
more detail in test failure messages for MultiHostValidatorOperator, wallet frontend tests (#3479)
* improve error messages in MultiHostValidatorOperatorIntegrationTest - help for recurrence of DACH-NY/cn-test-failures#6683 * print more when UI party description doesn't match - help for recurrence of DACH-NY/cn-test-failures#6695 --------- Signed-off-by: Stephen Compall <stephen.compall@digitalasset.com>
1 parent 576f90f commit 5c9c6f0

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

apps/app/src/test/scala/org/lfdecentralizedtrust/splice/integration/tests/MultiHostValidatorOperatorIntegrationTest.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class MultiHostValidatorOperatorIntegrationTest
7777
)(
7878
"Topology has changed",
7979
_ => {
80-
multiHostedParties.foreach(party =>
80+
forEvery(multiHostedParties)(party =>
8181
aliceParticipant.topology.party_to_participant_mappings
8282
.list(
8383
synchronizerId,
@@ -125,7 +125,7 @@ class MultiHostValidatorOperatorIntegrationTest
125125
)(
126126
"Alice sees the transaction",
127127
_ =>
128-
multiHostedParties.foreach { party =>
128+
forEvery(multiHostedParties) { party =>
129129
val mappings = aliceParticipant.topology.party_to_participant_mappings
130130
.list(
131131
synchronizerId,
@@ -152,7 +152,7 @@ class MultiHostValidatorOperatorIntegrationTest
152152
)(
153153
"Wait for confirmation rights",
154154
_ =>
155-
multiHostedParties.foreach(party => {
155+
forEvery(multiHostedParties) { party =>
156156
val mapping =
157157
aliceValidatorBackend.participantClient.topology.party_to_participant_mappings
158158
.list(
@@ -162,7 +162,7 @@ class MultiHostValidatorOperatorIntegrationTest
162162
)
163163
mapping should not be empty
164164
mapping.last.item.participants.last.permission shouldBe ParticipantPermission.Confirmation
165-
}),
165+
},
166166
)
167167

168168
clue("Setup transfer preapproval") {

apps/app/src/test/scala/org/lfdecentralizedtrust/splice/util/WalletFrontendTestUtil.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,12 @@ trait WalletFrontendTestUtil extends WalletTestUtil { self: FrontendTestCommon =
195195
)(implicit env: SpliceTestConsoleEnvironment): Assertion = {
196196
val transaction = readTransactionFromRow(transactionRow)
197197

198-
transaction.action should matchText(expectedAction)
199-
transaction.subtype should matchText(expectedSubtype)
200-
(transaction.partyDescription, expectedPartyDescription) match {
201-
case (None, None) => ()
198+
transaction.action should matchText(expectedAction) withClue "action"
199+
transaction.subtype should matchText(expectedSubtype) withClue "subtype"
200+
inside((transaction.partyDescription, expectedPartyDescription)) {
201+
case (None, None) => succeed
202202
case (Some(party), Some(ep)) => party should matchText(ep)
203-
case _ => fail(s"Unexpected party in transaction: $transaction")
204-
}
203+
} withClue s"Unexpected party in transaction: $transaction"
205204
transaction.ccAmount should beWithin(expectedAmountAmulet._1, expectedAmountAmulet._2)
206205
transaction.usdAmount should beWithin(
207206
expectedAmountUSD._1,

0 commit comments

Comments
 (0)