diff --git a/tests/helper/helper_generic.go b/tests/helper/helper_generic.go index 55ad49b5408..0c8a69be52d 100644 --- a/tests/helper/helper_generic.go +++ b/tests/helper/helper_generic.go @@ -195,6 +195,7 @@ func RunCmdWithMatchOutputFromBuffer(timeoutAfter time.Duration, matchString, pr if err != nil { return false, err } + defer command.Process.Kill() // go routine which is reading data from buffer until expected string matched go func() { diff --git a/tests/integration/devfile/cmd_devfile_log_test.go b/tests/integration/devfile/cmd_devfile_log_test.go index 60a543b084b..501a0cf3318 100644 --- a/tests/integration/devfile/cmd_devfile_log_test.go +++ b/tests/integration/devfile/cmd_devfile_log_test.go @@ -58,10 +58,12 @@ var _ = Describe("odo devfile log command tests", func() { output := helper.CmdShouldPass("odo", "log") Expect(output).To(ContainSubstring("ODO_COMMAND_RUN")) - // Test odo log -f - match, err := helper.RunCmdWithMatchOutputFromBuffer(30*time.Second, "program=devrun", "odo", "log", "-f") - Expect(err).To(BeNil()) - Expect(match).To(BeTrue()) + /* + Flaky Test odo log -f + match, err := helper.RunCmdWithMatchOutputFromBuffer(30*time.Second, "program=devrun", "odo", "log", "-f") + Expect(err).To(BeNil()) + Expect(match).To(BeTrue()) + */ }) @@ -83,10 +85,12 @@ var _ = Describe("odo devfile log command tests", func() { output := helper.CmdShouldPass("odo", "log", "--debug") Expect(output).To(ContainSubstring("ODO_COMMAND_DEBUG")) - // test with follow flag - match, err := helper.RunCmdWithMatchOutputFromBuffer(30*time.Second, "program=debugrun", "odo", "log", "-f") - Expect(err).To(BeNil()) - Expect(match).To(BeTrue()) + /* + Flaky Test odo log -f + match, err := helper.RunCmdWithMatchOutputFromBuffer(30*time.Second, "program=debugrun", "odo", "log", "-f") + Expect(err).To(BeNil()) + Expect(match).To(BeTrue()) + */ })