Skip to content

Commit

Permalink
chore: Bump killDuration for signals_test.go to avoid flaky test resu…
Browse files Browse the repository at this point in the history
…lt (argoproj#11064)

Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
  • Loading branch information
terrytangyuan committed May 10, 2023
1 parent 612adcd commit 01d8cff
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/e2e/signals_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/argoproj/argo-workflows/v3/test/e2e/fixtures"
)

const kill2xDuration = 70 * time.Second
const killDuration = 75 * time.Second

// Tests the use of signals to kill containers.
// argoproj/argosay:v2 does not contain sh, so you must use argoproj/argosay:v1.
Expand All @@ -29,9 +29,9 @@ func (s *SignalsSuite) TestStopBehavior() {
Workflow("@functional/stop-terminate.yaml").
When().
SubmitWorkflow().
WaitForWorkflow(fixtures.ToHaveRunningPod, kill2xDuration).
WaitForWorkflow(fixtures.ToHaveRunningPod, killDuration).
ShutdownWorkflow(wfv1.ShutdownStrategyStop).
WaitForWorkflow(kill2xDuration).
WaitForWorkflow(killDuration).
Then().
ExpectWorkflow(func(t *testing.T, m *metav1.ObjectMeta, status *wfv1.WorkflowStatus) {
assert.Contains(t, []wfv1.WorkflowPhase{wfv1.WorkflowFailed, wfv1.WorkflowError}, status.Phase)
Expand All @@ -55,9 +55,9 @@ func (s *SignalsSuite) TestStopBehaviorWithDaemon() {
Workflow("@functional/stop-terminate-daemon.yaml").
When().
SubmitWorkflow().
WaitForWorkflow(fixtures.ToHaveRunningPod, kill2xDuration).
WaitForWorkflow(fixtures.ToHaveRunningPod, killDuration).
ShutdownWorkflow(wfv1.ShutdownStrategyStop).
WaitForWorkflow(kill2xDuration).
WaitForWorkflow(killDuration).
Then().
ExpectWorkflow(func(t *testing.T, m *metav1.ObjectMeta, status *wfv1.WorkflowStatus) {
assert.Contains(t, []wfv1.WorkflowPhase{wfv1.WorkflowFailed, wfv1.WorkflowError}, status.Phase)
Expand All @@ -73,9 +73,9 @@ func (s *SignalsSuite) TestTerminateBehavior() {
Workflow("@functional/stop-terminate.yaml").
When().
SubmitWorkflow().
WaitForWorkflow(fixtures.ToHaveRunningPod, kill2xDuration).
WaitForWorkflow(fixtures.ToHaveRunningPod, killDuration).
ShutdownWorkflow(wfv1.ShutdownStrategyTerminate).
WaitForWorkflow(kill2xDuration).
WaitForWorkflow(killDuration).
Then().
ExpectWorkflow(func(t *testing.T, m *metav1.ObjectMeta, status *wfv1.WorkflowStatus) {
assert.Contains(t, []wfv1.WorkflowPhase{wfv1.WorkflowFailed, wfv1.WorkflowError}, status.Phase)
Expand All @@ -96,9 +96,9 @@ func (s *SignalsSuite) TestDoNotCreatePodsUnderStopBehavior() {
Workflow("@functional/stop-terminate-2.yaml").
When().
SubmitWorkflow().
WaitForWorkflow(fixtures.ToHaveRunningPod, kill2xDuration).
WaitForWorkflow(fixtures.ToHaveRunningPod, killDuration).
ShutdownWorkflow(wfv1.ShutdownStrategyStop).
WaitForWorkflow(kill2xDuration).
WaitForWorkflow(killDuration).
Then().
ExpectWorkflow(func(t *testing.T, m *metav1.ObjectMeta, status *wfv1.WorkflowStatus) {
assert.Equal(t, wfv1.WorkflowFailed, status.Phase)
Expand All @@ -116,7 +116,7 @@ func (s *SignalsSuite) TestSidecars() {
Workflow("@testdata/sidecar-workflow.yaml").
When().
SubmitWorkflow().
WaitForWorkflow(fixtures.ToBeSucceeded, kill2xDuration)
WaitForWorkflow(fixtures.ToBeSucceeded, killDuration)
}

// make sure Istio/Anthos and other sidecar injectors will work
Expand All @@ -125,7 +125,7 @@ func (s *SignalsSuite) TestInjectedSidecar() {
Workflow("@testdata/sidecar-injected-workflow.yaml").
When().
SubmitWorkflow().
WaitForWorkflow(fixtures.ToBeSucceeded, kill2xDuration)
WaitForWorkflow(fixtures.ToBeSucceeded, killDuration)
}

func (s *SignalsSuite) TestSubProcess() {
Expand Down

0 comments on commit 01d8cff

Please sign in to comment.