mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-18 16:17:03 +00:00
test: attempt less flaky tests
This commit is contained in:
@ -75,7 +75,9 @@ func userIsDisconnected(bddUserID string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return internalError(err, "getting user %s", account.Username())
|
return internalError(err, "getting user %s", account.Username())
|
||||||
}
|
}
|
||||||
a.False(ctx.GetTestingT(), bridgeUser.IsConnected())
|
a.Eventually(ctx.GetTestingT(), func() bool {
|
||||||
|
return !bridgeUser.IsConnected()
|
||||||
|
}, 5*time.Second, 10*time.Millisecond)
|
||||||
return ctx.GetTestingError()
|
return ctx.GetTestingError()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +91,9 @@ func userIsConnected(bddUserID string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return internalError(err, "getting user %s", account.Username())
|
return internalError(err, "getting user %s", account.Username())
|
||||||
}
|
}
|
||||||
a.True(ctx.GetTestingT(), bridgeUser.IsConnected())
|
a.Eventually(ctx.GetTestingT(), func() bool {
|
||||||
|
return bridgeUser.IsConnected()
|
||||||
|
}, 5*time.Second, 10*time.Millisecond)
|
||||||
a.NotEmpty(t, bridgeUser.GetPrimaryAddress())
|
a.NotEmpty(t, bridgeUser.GetPrimaryAddress())
|
||||||
a.NotEmpty(t, bridgeUser.GetStoreAddresses())
|
a.NotEmpty(t, bridgeUser.GetStoreAddresses())
|
||||||
return ctx.GetTestingError()
|
return ctx.GetTestingError()
|
||||||
|
|||||||
Reference in New Issue
Block a user