Skip to content

Commit 0a2d1ba

Browse files
committed
tweaked the delay
1 parent 1e41f52 commit 0a2d1ba

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

npm/pkg/dataplane/dataplane_linux_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func TestNetPolInBackgroundUpdatePolicy(t *testing.T) {
8282
require.NoError(t, err)
8383
defer func() {
8484
stopCh <- struct{}{}
85-
time.Sleep(5000 * time.Millisecond)
85+
time.Sleep(3000 * time.Millisecond)
8686
klog.Info("defer for TestNetPolInBackgroundUpdatePolicy finished")
8787
}()
8888

@@ -91,12 +91,12 @@ func TestNetPolInBackgroundUpdatePolicy(t *testing.T) {
9191
err = dp.AddPolicy(&testPolicyobj)
9292
require.NoError(t, err)
9393

94-
time.Sleep(5000 * time.Millisecond)
94+
time.Sleep(3000 * time.Millisecond)
9595

9696
err = dp.UpdatePolicy(&updatedTestPolicyobj)
9797
require.NoError(t, err)
9898

99-
time.Sleep(5000 * time.Millisecond)
99+
time.Sleep(3000 * time.Millisecond)
100100

101101
linuxPromVals{2, 1, 0, 0, 1}.assert(t)
102102
}
@@ -112,15 +112,15 @@ func TestNetPolInBackgroundSkipAddAfterRemove(t *testing.T) {
112112
require.NoError(t, err)
113113
defer func() {
114114
stopCh <- struct{}{}
115-
time.Sleep(5000 * time.Millisecond)
115+
time.Sleep(100 * time.Millisecond)
116116
klog.Info("defer for TestNetPolInBackgroundSkipAddAfterRemove finished")
117117
}()
118118

119119
require.NoError(t, dp.AddPolicy(&testPolicyobj))
120120
require.NoError(t, dp.RemovePolicy(testPolicyobj.PolicyKey))
121121

122122
dp.RunPeriodicTasks()
123-
time.Sleep(5000 * time.Millisecond)
123+
time.Sleep(100 * time.Millisecond)
124124

125125
// nothing happens
126126
linuxPromVals{0, 0, 0, 0, 0}.assert(t)
@@ -178,7 +178,7 @@ func TestNetPolInBackgroundFailureToAddFirstTime(t *testing.T) {
178178
require.NoError(t, err)
179179
defer func() {
180180
stopCh <- struct{}{}
181-
time.Sleep(5000 * time.Millisecond)
181+
time.Sleep(100 * time.Millisecond)
182182
}()
183183

184184
require.NoError(t, dp.AddPolicy(&testPolicyobj))

0 commit comments

Comments
 (0)