fix flaky tests (#1860)
This commit is contained in:
parent
46b05c7478
commit
491e3be799
|
@ -438,13 +438,15 @@ type RequestMessagesSyncSuite struct {
|
|||
func (s *RequestMessagesSyncSuite) TestExpired() {
|
||||
// intentionally discarding all requests, so that request will timeout
|
||||
go func() {
|
||||
msg, err := s.remoteRW.ReadMsg()
|
||||
s.Require().NoError(err)
|
||||
s.Require().NoError(msg.Discard())
|
||||
for {
|
||||
msg, err := s.remoteRW.ReadMsg()
|
||||
s.Require().NoError(err)
|
||||
s.Require().NoError(msg.Discard())
|
||||
}
|
||||
}()
|
||||
_, err := s.localAPI.RequestMessagesSync(
|
||||
ext.RetryConfig{
|
||||
BaseTimeout: time.Second,
|
||||
BaseTimeout: time.Millisecond * 100,
|
||||
},
|
||||
ext.MessagesRequest{
|
||||
MailServerPeer: s.localNode.String(),
|
||||
|
|
|
@ -353,9 +353,11 @@ type RequestMessagesSyncSuite struct {
|
|||
func (s *RequestMessagesSyncSuite) TestExpired() {
|
||||
// intentionally discarding all requests, so that request will timeout
|
||||
go func() {
|
||||
msg, err := s.remoteRW.ReadMsg()
|
||||
s.Require().NoError(err)
|
||||
s.Require().NoError(msg.Discard())
|
||||
for {
|
||||
msg, err := s.remoteRW.ReadMsg()
|
||||
s.Require().NoError(err)
|
||||
s.Require().NoError(msg.Discard())
|
||||
}
|
||||
}()
|
||||
_, err := s.localAPI.RequestMessagesSync(
|
||||
ext.RetryConfig{
|
||||
|
|
Loading…
Reference in New Issue