Skip to content

Commit edd7aa9

Browse files
committed
test: relax all eventually checks
1 parent e148728 commit edd7aa9

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

extcontainer/container_discovery_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func Test_containerDiscovery(t *testing.T) {
9090
assert.EventuallyWithT(t, func(c *assert.CollectT) {
9191
ed, _ := d.DiscoverEnrichmentData(context.Background())
9292
assert.Len(c, ed, 1)
93-
}, 1*time.Second, 100*time.Millisecond)
93+
}, 5*time.Second, 100*time.Millisecond)
9494

9595
// Then
9696
targets, _ := d.DiscoverEnrichmentData(context.Background())
@@ -221,7 +221,7 @@ func Test_getDiscoveredContainerShouldIgnoreLabeledPods(t *testing.T) {
221221
assert.EventuallyWithT(t, func(c *assert.CollectT) {
222222
ed, _ := d.DiscoverEnrichmentData(context.Background())
223223
assert.Len(c, ed, 1)
224-
}, 1*time.Second, 100*time.Millisecond)
224+
}, 5*time.Second, 100*time.Millisecond)
225225
}
226226

227227
func Test_getDiscoveredContainerShouldNotIgnoreLabeledPodsIfExcludesDisabled(t *testing.T) {
@@ -251,7 +251,7 @@ func Test_getDiscoveredContainerShouldNotIgnoreLabeledPodsIfExcludesDisabled(t *
251251
assert.EventuallyWithT(t, func(c *assert.CollectT) {
252252
ed, _ := d.DiscoverEnrichmentData(context.Background())
253253
assert.Len(c, ed, 2)
254-
}, 1*time.Second, 100*time.Millisecond)
254+
}, 5*time.Second, 100*time.Millisecond)
255255
}
256256

257257
func getTestClient(stopCh <-chan struct{}) (*kclient.Client, kubernetes.Interface) {

extdaemonset/daemonset_discovery_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func Test_daemonSetDiscovery(t *testing.T) {
234234
assert.EventuallyWithT(t, func(c *assert.CollectT) {
235235
ed, _ := d.DiscoverTargets(context.Background())
236236
assert.Len(c, ed, 1)
237-
}, 1*time.Second, 100*time.Millisecond)
237+
}, 5*time.Second, 100*time.Millisecond)
238238

239239
// Then
240240
targets, _ := d.DiscoverTargets(context.Background())

extdeployment/deployment_discovery_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ func Test_deploymentDiscovery(t *testing.T) {
408408
assert.EventuallyWithT(t, func(c *assert.CollectT) {
409409
ed, _ := d.DiscoverTargets(context.Background())
410410
assert.Len(c, ed, 1)
411-
}, 1*time.Second, 100*time.Millisecond)
411+
}, 5*time.Second, 100*time.Millisecond)
412412

413413
// Then
414414
targets, _ := d.DiscoverTargets(context.Background())
@@ -657,7 +657,7 @@ func Test_getDiscoveredDeploymentsShouldIgnoreLabeledDeployments(t *testing.T) {
657657
assert.EventuallyWithT(t, func(c *assert.CollectT) {
658658
ed, _ := d.DiscoverTargets(context.Background())
659659
assert.Len(c, ed, 1)
660-
}, 1*time.Second, 100*time.Millisecond)
660+
}, 5*time.Second, 100*time.Millisecond)
661661
}
662662

663663
func Test_getDiscoveredDeploymentsShouldNotIgnoreLabeledDeploymentsIfExcludesDisabled(t *testing.T) {
@@ -688,7 +688,7 @@ func Test_getDiscoveredDeploymentsShouldNotIgnoreLabeledDeploymentsIfExcludesDis
688688
assert.EventuallyWithT(t, func(c *assert.CollectT) {
689689
ed, _ := d.DiscoverTargets(context.Background())
690690
assert.Len(c, ed, 2)
691-
}, 1*time.Second, 100*time.Millisecond)
691+
}, 5*time.Second, 100*time.Millisecond)
692692
}
693693

694694
func getTestClient(stopCh <-chan struct{}) (*client.Client, kubernetes.Interface) {

extnamespace/namespace_util_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func Test_namespaceDiscovery(t *testing.T) {
5656
assert.EventuallyWithT(t, func(c *assert.CollectT) {
5757
attributes = AddNamespaceLabels(client, tt.namespace.Name, map[string][]string{})
5858
require.Len(t, attributes, 2)
59-
}, 1*time.Second, 100*time.Millisecond)
59+
}, 5*time.Second, 100*time.Millisecond)
6060

6161
// Then
6262
require.Len(t, attributes, 2)

extnode/node_discovery_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func Test_nodeDiscovery(t *testing.T) {
142142
assert.EventuallyWithT(t, func(c *assert.CollectT) {
143143
ed, _ := d.DiscoverTargets(context.Background())
144144
assert.Len(c, ed, 1)
145-
}, 1*time.Second, 100*time.Millisecond)
145+
}, 5*time.Second, 100*time.Millisecond)
146146

147147
// Then
148148
targets, _ := d.DiscoverTargets(context.Background())

extreplicaset/replicaset_discovery_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func Test_replicasetDiscovery(t *testing.T) {
168168
assert.EventuallyWithT(t, func(c *assert.CollectT) {
169169
ed, _ := d.DiscoverTargets(context.Background())
170170
assert.Len(c, ed, 1)
171-
}, 1*time.Second, 100*time.Millisecond)
171+
}, 5*time.Second, 100*time.Millisecond)
172172

173173
// Then
174174
targets, _ := d.DiscoverTargets(context.Background())
@@ -396,7 +396,7 @@ func Test_getDiscoveredReplicaSetsShouldIgnoreLabeledReplicaSets(t *testing.T) {
396396
assert.EventuallyWithT(t, func(c *assert.CollectT) {
397397
ed, _ := d.DiscoverTargets(context.Background())
398398
assert.Len(c, ed, 1)
399-
}, 1*time.Second, 100*time.Millisecond)
399+
}, 5*time.Second, 100*time.Millisecond)
400400
}
401401

402402
func Test_getDiscoveredReplicaSetsShouldNotIgnoreLabeledReplicaSetsIfExcludesDisabled(t *testing.T) {
@@ -427,7 +427,7 @@ func Test_getDiscoveredReplicaSetsShouldNotIgnoreLabeledReplicaSetsIfExcludesDis
427427
assert.EventuallyWithT(t, func(c *assert.CollectT) {
428428
ed, _ := d.DiscoverTargets(context.Background())
429429
assert.Len(c, ed, 2)
430-
}, 1*time.Second, 100*time.Millisecond)
430+
}, 5*time.Second, 100*time.Millisecond)
431431
}
432432

433433
func getTestClient(stopCh <-chan struct{}) (*client.Client, kubernetes.Interface) {

extstatefulset/statefulset_discovery_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func Test_statefulSetDiscovery(t *testing.T) {
262262
assert.EventuallyWithT(t, func(c *assert.CollectT) {
263263
ed, _ := d.DiscoverTargets(context.Background())
264264
assert.Len(c, ed, 1)
265-
}, 1*time.Second, 100*time.Millisecond)
265+
}, 5*time.Second, 100*time.Millisecond)
266266

267267
// Then
268268
targets, _ := d.DiscoverTargets(context.Background())

0 commit comments

Comments
 (0)