mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 18:20:42 -07:00
test: fix TestAccountImportCycle flake (#4381)
Add extra flushes to make test more precise and try to avoid timeouts
```
=== RUN TestAccountImportCycle
accounts_test.go:3447: require no error, but got: nats: timeout
--- FAIL: TestAccountImportCycle (1.01s)
```
This commit is contained in:
@@ -3432,11 +3432,13 @@ func TestAccountImportCycle(t *testing.T) {
|
||||
// setup requestor
|
||||
ib := "q2.inbox"
|
||||
subAResp, err := ncA.SubscribeSync(ib)
|
||||
ncA.Flush()
|
||||
require_NoError(t, err)
|
||||
req := func() {
|
||||
t.Helper()
|
||||
// send request
|
||||
err = ncA.PublishRequest("q1.a", ib, []byte("test"))
|
||||
ncA.Flush()
|
||||
require_NoError(t, err)
|
||||
mRep, err := subAResp.NextMsg(time.Second)
|
||||
require_NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user