Skip to content

Commit 88b7be0

Browse files
committed
fix(fungible): wait for FSC endorsers to catch up in TestPublicParamsUpdate
TestPublicParamsUpdate updates public parameters and waited for the issuer/auditor nodes to observe them, but never waited for FSC endorser nodes (present under FSCBasedEndorsement, e.g. fabricx). The endorser validates auditor signatures against its own locally cached public params, so a subsequent issue with the new auditor/issuer could race ahead of the endorser's update and fail with "auditor [...] is not in auditors". Mirrors the existing wait pattern already used in TestAll. Signed-off-by: Angelo De Caro <adc@zurich.ibm.com>
1 parent d32ce37 commit 88b7be0

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

integration/token/fungible/tests.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,7 @@ func TestPublicParamsUpdate(network *integration.Infrastructure, newAuditorID st
915915
alice := sel.Get("alice")
916916
manager := sel.Get("manager")
917917
auditor := sel.Get("auditor")
918+
endorsers := GetEndorsers(network, sel)
918919
if issuerAsAuditor {
919920
auditor = issuer
920921
}
@@ -931,6 +932,10 @@ func TestPublicParamsUpdate(network *integration.Infrastructure, newAuditorID st
931932
if !issuerAsAuditor {
932933
gomega.Eventually(GetPublicParams).WithArguments(network, newAuditor).WithTimeout(60 * time.Second).WithPolling(5 * time.Second).Should(gomega.Equal(ppBytes))
933934
}
935+
for _, endorser := range endorsers {
936+
gomega.Eventually(GetPublicParams).WithArguments(network, endorser).WithTimeout(60 * time.Second).WithPolling(5 * time.Second).Should(gomega.Equal(ppBytes))
937+
}
938+
CheckPublicParams(network, endorsers...)
934939
// give time to the issuer and the auditor to update their public parameters and reload their wallets
935940
gomega.Eventually(DoesWalletExist).WithArguments(network, newIssuer, "", views.IssuerWallet).WithTimeout(1 * time.Minute).WithPolling(15 * time.Second).Should(gomega.BeTrue())
936941
if issuerAsAuditor {

0 commit comments

Comments
 (0)