Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion devenv/tests/automation/smoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,16 @@ func basicAutomationTest(t *testing.T, testcase Testcase) {
l.Info().Msgf("Upgrading node %d to version %s", i, testcase.upgradeImage)
err = products.RestartNodes(t.Context(), in.NodeSets[0], in.Blockchains[0], true, time.Minute)
require.NoError(t, err, "Error when upgrading node %d", i)
time.Sleep(time.Second * 10)
// Poll until the node is ready by checking that the chain client
// can successfully retrieve a new block number, indicating the node
// has recovered and is processing transactions.
var preRestartBlock uint64
gom.Eventually(t, func() (uint64, error) {
block, err := a.ChainClient.Client.BlockNumber(t.Context())
return block, err
}, time.Minute*2, time.Second*2).Should(gomega.BeNumerically(">", preRestartBlock),
"Node %d should be processing new blocks after restart", i)
l.Info().Msgf("Node %d is ready after upgrade", i)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but this chain client has nothing to do with the node... it's a standalone Ethereum client that connects to the RPC

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how else would you remove the sleep?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just delete it or check something meaningful, i.e. node's health endpoints and not whether the blockchain has advanced beyond some block old block, because that has nothing to do with the node

expect += testcase.ExpectedUpkeepExecutions
gom.Eventually(func(g gomega.Gomega) {
// Check if the upkeeps are performing multiple times by analyzing their counters and checking they are increasing by 5 in each step within 5 minutes
Expand Down
Loading