chore: skip flaky tests (#5606)

* chore_: skip TestPeerCount

* chore_: skip flaky wallet tests

* chore_: skip flaky TestMemberReceivesPendingRequestToJoinAfterAfterGettingTokenMasterRole
This commit is contained in:
Igor Sirotin 2024-07-27 10:27:26 +01:00 committed by GitHub
parent 3cc4767638
commit e76d93d340
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 30 additions and 13 deletions

View File

@ -10,6 +10,7 @@ import (
gethcommon "github.com/ethereum/go-ethereum/common"
hexutil "github.com/ethereum/go-ethereum/common/hexutil"
gethbridge "github.com/status-im/status-go/eth-node/bridge/geth"
"github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/eth-node/types"
@ -819,6 +820,8 @@ func (s *MessengerCommunitiesSharedMemberAddressSuite) TestTokenMasterReceivesAc
}
func (s *MessengerCommunitiesSharedMemberAddressSuite) TestMemberReceivesPendingRequestToJoinAfterAfterGettingTokenMasterRole() {
s.T().Skip("flaky test")
community, _ := createOnRequestCommunity(&s.Suite, s.owner)
advertiseCommunityTo(&s.Suite, community, s.owner, s.alice)

View File

@ -210,6 +210,9 @@ func TestNoBalanceForTheBestRouteRouterV2(t *testing.T) {
// Test blocking endpoints
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if tt.flaky {
t.Skip("Flaky test")
}
routes, err := router.SuggestedRoutesV2(context.Background(), tt.input)
@ -230,20 +233,26 @@ func TestNoBalanceForTheBestRouteRouterV2(t *testing.T) {
// Test async endpoints
for _, tt := range tests {
router.SuggestedRoutesV2Async(tt.input)
select {
case asyncRoutes := <-suggestedRoutesCh:
assert.Equal(t, tt.input.Uuid, asyncRoutes.Uuid)
assert.Equal(t, tt.expectedError, asyncRoutes.ErrorResponse)
assertPathsEqual(t, tt.expectedCandidates, asyncRoutes.Candidates)
if tt.expectedError == nil {
assertPathsEqual(t, tt.expectedBest, asyncRoutes.Best)
t.Run(tt.name, func(t *testing.T) {
if tt.flaky {
t.Skip("Flaky test")
}
break
case <-time.After(10 * time.Second):
t.FailNow()
}
router.SuggestedRoutesV2Async(tt.input)
select {
case asyncRoutes := <-suggestedRoutesCh:
assert.Equal(t, tt.input.Uuid, asyncRoutes.Uuid)
assert.Equal(t, tt.expectedError, asyncRoutes.ErrorResponse)
assertPathsEqual(t, tt.expectedCandidates, asyncRoutes.Candidates)
if tt.expectedError == nil {
assertPathsEqual(t, tt.expectedBest, asyncRoutes.Best)
}
break
case <-time.After(10 * time.Second):
t.FailNow()
}
})
}
}

View File

@ -2594,6 +2594,7 @@ type noBalanceTestParams struct {
expectedCandidates []*PathV2
expectedBest []*PathV2
expectedError *errors.ErrorResponse
flaky bool
}
func getNoBalanceTestParamsList() []noBalanceTestParams {
@ -2726,6 +2727,7 @@ func getNoBalanceTestParamsList() []noBalanceTestParams {
approvalL1Fee: testApprovalL1Fee,
},
},
flaky: true,
expectedError: &errors.ErrorResponse{
Code: ErrNotEnoughTokenBalance.Code,
Details: fmt.Sprintf(ErrNotEnoughTokenBalance.Details, pathprocessor.UsdcSymbol, walletCommon.EthereumMainnet),
@ -2786,6 +2788,7 @@ func getNoBalanceTestParamsList() []noBalanceTestParams {
approvalL1Fee: testApprovalL1Fee,
},
},
flaky: true,
expectedError: &errors.ErrorResponse{
Code: ErrNotEnoughNativeBalance.Code,
Details: fmt.Sprintf(ErrNotEnoughNativeBalance.Details, pathprocessor.EthSymbol, walletCommon.EthereumMainnet),

View File

@ -352,6 +352,8 @@ func setDefaultConfig(config *wakuv2.Config, lightMode bool) {
var testStoreENRBootstrap = "enrtree://AI4W5N5IFEUIHF5LESUAOSMV6TKWF2MB6GU2YK7PU4TYUGUNOCEPW@store.staging.shards.nodes.status.im"
func TestPeerCount(t *testing.T) {
t.Skip("flaky test")
expectedCondition := func(received []TelemetryRequest) (shouldSucceed bool, shouldFail bool) {
found := slices.ContainsFunc(received, func(req TelemetryRequest) bool {
t.Log(req)