Remove time from test

This commit is contained in:
mcrakhman 2023-06-29 01:05:43 +02:00
parent 68cda47ede
commit 5ffc175f4f
No known key found for this signature in database
GPG Key ID: DED12CFEF5B8396B

View File

@ -4,7 +4,6 @@ import (
"context" "context"
"sync" "sync"
"testing" "testing"
"time"
"github.com/anyproto/any-sync/commonspace/objectsync" "github.com/anyproto/any-sync/commonspace/objectsync"
"github.com/anyproto/any-sync/commonspace/objectsync/mock_objectsync" "github.com/anyproto/any-sync/commonspace/objectsync/mock_objectsync"
@ -181,11 +180,7 @@ func TestRequestManager_QueueRequest(t *testing.T) {
fx.requestManager.Close(context.Background()) fx.requestManager.Close(context.Background())
close(msgRelease) close(msgRelease)
// waiting to know if the second one is not taken
// because the manager is now closed
time.Sleep(200 * time.Millisecond)
_, ok = msgs.Load("id2") _, ok = msgs.Load("id2")
require.False(t, ok) require.False(t, ok)
fx.requestManager.Close(context.Background())
}) })
} }