Skip to content

Instantly share code, notes, and snippets.

@huitseeker
Created August 20, 2021 19:21
Show Gist options
  • Save huitseeker/3eecce8d13fc60e45180039855171324 to your computer and use it in GitHub Desktop.
Save huitseeker/3eecce8d13fc60e45180039855171324 to your computer and use it in GitHub Desktop.
------ /home/huitseeker/tmp/flow-go/network/p2p/peerManager_test.go
++++++ /home/huitseeker/tmp/flow-go/network/p2p/peerManager_test.go
@|-201,9 +201,7 ============================================================
| unittest.RequireCloseBefore(suite.T(), pm.Ready(), 2*time.Second, "could not start peer manager")
|
| // assert that the first update started
!| assert.Eventually(suite.T(), func() bool {
!| return connector.AssertNumberOfCalls(suite.T(), "UpdatePeers", 1)
!| }, 3*time.Second, 100*time.Millisecond)
|
| // makes 10 concurrent request for peer update
| unittest.RequireConcurrentCallsReturnBefore(suite.T(), pm.RequestPeerUpdate, 10, time.Second,
@|-213,9 +211,7 ============================================================
| connectPeerGate <- time.Now()
|
| // assert that only two calls to UpdatePeers were made (one by the periodic update and one by the on-demand update)
!| assert.Eventually(suite.T(), func() bool {
!| return connector.AssertNumberOfCalls(suite.T(), "UpdatePeers", 2)
!| }, 10*time.Second, 100*time.Millisecond)
|}
|
|// assertListsEqual asserts that two identity list are equal ignoring the order
------ /home/huitseeker/tmp/flow-go/engine/execution/provider/engine_test.go
++++++ /home/huitseeker/tmp/flow-go/engine/execution/provider/engine_test.go
@|-182,9 +182,7 ============================================================
| ps.AssertExpectations(t)
| ss.AssertExpectations(t)
| execState.AssertExpectations(t)
!| assert.Eventually(t, func() bool {
!| return con.AssertExpectations(t)
!| }, time.Second, time.Millisecond)
| })
|
| t.Run("reply to chunk data pack request only when staked", func(t *testing.T) {
@|-246,8 +244,6 ============================================================
| ss.AssertExpectations(t)
| execState.AssertExpectations(t)
|
!| assert.Eventually(t, func() bool {
!| return con.AssertExpectations(t)
!| }, time.Second, time.Millisecond)
| })
|}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment