Skip to content

Commit d9fb3a6

Browse files
committed
e2e: fpga: fix false failure
During tests a second plugin started running before the first one had exited. It resulted in the plugin going to crashloop and the workload getting stuck. Signed-off-by: Tuomas Katila <[email protected]>
1 parent d339488 commit d9fb3a6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/e2e/fpga/fpga.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ func describe() {
6464
fmw := framework.NewDefaultFramework("fpgaplugin-e2e")
6565
fmw.NamespacePodSecurityEnforceLevel = admissionapi.LevelPrivileged
6666

67+
// Delete namespace manually after Contexts. Without this, two plugins can run at the same time
68+
// and the latter plugin will fail to run.
69+
// A better way would be to delete the deployment, but it's constructed inside runDevicePlugin.
70+
ginkgo.AfterEach(func(ctx context.Context) {
71+
fmw.DeleteNamespace(ctx, fmw.Namespace.Name)
72+
})
73+
6774
ginkgo.Context("When FPGA plugin is running in region mode [Mode:region]", func() {
6875
ginkgo.BeforeEach(func(ctx context.Context) {
6976
runDevicePlugin(ctx, fmw, pluginKustomizationPath, mappingsCollectionPath, arria10NodeResource, "region")

0 commit comments

Comments
 (0)