From 2f25992120d4e08ce43bd481825bf37da8d2f9b7 Mon Sep 17 00:00:00 2001 From: Fedor Partanskiy Date: Mon, 14 Oct 2024 11:51:22 +0300 Subject: [PATCH] test "verifies private data is pulled when joining a new peer with new certs" is very unstable. I change log level for test in integration pvtdata. Signed-off-by: Fedor Partanskiy --- integration/pvtdata/pvtdata_test.go | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/integration/pvtdata/pvtdata_test.go b/integration/pvtdata/pvtdata_test.go index 0ff64d4cede..4932fc972c8 100644 --- a/integration/pvtdata/pvtdata_test.go +++ b/integration/pvtdata/pvtdata_test.go @@ -370,14 +370,21 @@ var _ = Describe("PrivateData", func() { } By("verifying peer1.org2 got the private data that was created historically") - sess, err = network.PeerUserSession(org2Peer1, "Admin2", commands.ChaincodeQuery{ - ChannelID: channelID, - Name: "marblesp", - Ctor: `{"Args":["readMarble","marble1"]}`, - }) - Expect(err).NotTo(HaveOccurred()) - Eventually(sess, network.EventuallyTimeout).Should(gexec.Exit(0)) - Expect(sess).To(gbytes.Say(`{"docType":"marble","name":"marble1","color":"blue","size":35,"owner":"tom"}`)) + Eventually(func() bool { + sess, err = network.PeerUserSession(org2Peer1, "Admin2", commands.ChaincodeQuery{ + ChannelID: channelID, + Name: "marblesp", + Ctor: `{"Args":["readMarble","marble1"]}`, + }) + Expect(err).NotTo(HaveOccurred()) + Eventually(sess, network.EventuallyTimeout).Should(gexec.Exit()) + if sess.ExitCode() != 0 { + return false + } + Expect(sess).To(gbytes.Say(`{"docType":"marble","name":"marble1","color":"blue","size":35,"owner":"tom"}`)) + + return true + }, network.EventuallyTimeout).Should(BeTrue()) sess, err = network.PeerUserSession(org2Peer1, "Admin2", commands.ChaincodeQuery{ ChannelID: channelID,