mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
controlplane: maybe fix flaky test (#1873)
This commit is contained in:
parent
9f6dc78798
commit
4bf5179bb6
1 changed files with 7 additions and 4 deletions
|
@ -8,6 +8,7 @@ import (
|
||||||
|
|
||||||
envoy_service_discovery_v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
|
envoy_service_discovery_v3 "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/test/bufconn"
|
"google.golang.org/grpc/test/bufconn"
|
||||||
|
@ -108,9 +109,11 @@ func TestManager(t *testing.T) {
|
||||||
typeURL: nil,
|
typeURL: nil,
|
||||||
})
|
})
|
||||||
|
|
||||||
msg, err = stream.Recv()
|
assert.Eventually(t, func() bool {
|
||||||
assert.NoError(t, err)
|
msg, err = stream.Recv()
|
||||||
assert.Equal(t, []string{"r1"}, msg.GetRemovedResources())
|
require.NoError(t, err)
|
||||||
ack(msg.Nonce)
|
ack(msg.Nonce)
|
||||||
|
return assert.ObjectsAreEqual([]string{"r1"}, msg.GetRemovedResources())
|
||||||
|
}, time.Second*5, time.Millisecond)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue