Skip to content

Commit 0bccc2d

Browse files
committed
fix: r
Signed-off-by: ashing <[email protected]>
1 parent ab055b2 commit 0bccc2d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/e2e/scaffold/api7_deployer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func (s *API7Deployer) BeforeEach() {
5454
Namespace: s.namespace,
5555
}
5656
if s.opts.ControllerName == "" {
57-
s.opts.ControllerName = fmt.Sprintf("%s/%d", DefaultControllerName, time.Now().Nanosecond())
57+
s.opts.ControllerName = fmt.Sprintf("%s/%s", DefaultControllerName, s.namespace)
5858
}
5959
s.finalizers = nil
6060
if s.label == nil {
@@ -122,14 +122,14 @@ func (s *API7Deployer) AfterEach() {
122122
Expect(err).NotTo(HaveOccurred(), "cleaning up additional gateway group")
123123
}
124124

125-
// if the test case is successful, just delete namespace
126-
err := k8s.DeleteNamespaceE(s.t, s.kubectlOptions, s.namespace)
127-
Expect(err).NotTo(HaveOccurred(), "deleting namespace "+s.namespace)
128-
129125
for i := len(s.finalizers) - 1; i >= 0; i-- {
130126
runWithRecover(s.finalizers[i])
131127
}
132128

129+
// if the test case is successful, just delete namespace
130+
err := k8s.DeleteNamespaceE(s.t, s.kubectlOptions, s.namespace)
131+
Expect(err).NotTo(HaveOccurred(), "deleting namespace "+s.namespace)
132+
133133
// Wait for a while to prevent the worker node being overwhelming
134134
// (new cases will be run).
135135
time.Sleep(3 * time.Second)

0 commit comments

Comments
 (0)