-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[STRMCMP-1639] Integration Test Fix #277
Changes from all commits
a0a90a0
0cc931c
3859dc3
33234ca
a43addf
698bc34
4e81a8d
cb21077
8a7811b
68b2330
b0eede8
490f385
f821e91
3e6dbfe
5101df2
e904616
0196be5
abc7186
3965f45
74bebca
bca42b4
02ebaef
c469f10
bd5a7b7
b3fabc6
f425da7
5350c37
3110b64
f6cc040
15787c6
521bac5
2c09fb2
4cb11e5
80b8251
38d31d6
9ea26a8
9a2f36b
6a8b657
f4bfd5b
f1d51ff
532906d
b5d6626
eb7ede2
238f0ce
cd0b4b1
5fc7c04
09b094d
54c61af
13ac8c0
138b0a4
73a17cf
b1dfd96
c928440
de9651f
1dd4788
63b6797
1cbc3f6
3db9f0c
6e86f70
7fab7cc
11fbbe8
69ccd27
21b7f7b
2579200
48b2ecf
aba457f
db88cf9
1db3074
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,7 @@ func WaitUpdateAndValidate(c *C, s *IntegSuite, name string, updateFn func(app * | |
|
||
// tests the workflow of job cancellation without savepoint | ||
func (s *IntegSuite) TestJobCancellationWithoutSavepoint(c *C) { | ||
|
||
log.Info("Starting test TestJobCancellationWithoutSavepoint") | ||
testName := "cancelsuccess" | ||
const finalizer = "simple.finalizers.test.com" | ||
|
||
|
@@ -81,7 +81,7 @@ func (s *IntegSuite) TestJobCancellationWithoutSavepoint(c *C) { | |
pods, err := s.Util.KubeClient.CoreV1().Pods(s.Util.Namespace.Name). | ||
List(v1.ListOptions{LabelSelector: "integTest=" + testName}) | ||
c.Assert(err, IsNil) | ||
c.Assert(len(pods.Items), Equals, 3) | ||
c.Assert(len(pods.Items), Equals, 2) | ||
for _, pod := range pods.Items { | ||
c.Assert(pod.Spec.Containers[0].Image, Equals, config.Spec.Image) | ||
} | ||
|
@@ -97,7 +97,7 @@ func (s *IntegSuite) TestJobCancellationWithoutSavepoint(c *C) { | |
pods, err = s.Util.KubeClient.CoreV1().Pods(s.Util.Namespace.Name). | ||
List(v1.ListOptions{LabelSelector: "integTest=" + testName}) | ||
c.Assert(err, IsNil) | ||
c.Assert(len(pods.Items), Equals, 3) | ||
c.Assert(len(pods.Items), Equals, 2) | ||
for _, pod := range pods.Items { | ||
c.Assert(pod.Spec.Containers[0].Image, Equals, NewImage) | ||
} | ||
|
@@ -131,11 +131,13 @@ func (s *IntegSuite) TestJobCancellationWithoutSavepoint(c *C) { | |
} | ||
} | ||
log.Info("All pods torn down") | ||
log.Info("Completed test TestJobCancellationWithoutSavepoint") | ||
} | ||
|
||
// tests a job update with the existing job already in cancelled state. | ||
// here, the new submitted job starts without a savepoint. | ||
func (s *IntegSuite) TestCancelledJobWithoutSavepoint(c *C) { | ||
log.Info("Starting test TestCancelledJobWithoutSavepoint") | ||
|
||
testName := "invalidcancel" | ||
config, err := s.Util.ReadFlinkApplication("test_app.yaml") | ||
|
@@ -150,6 +152,7 @@ func (s *IntegSuite) TestCancelledJobWithoutSavepoint(c *C) { | |
Commentf("Failed to create flink application")) | ||
|
||
c.Assert(s.Util.WaitForPhase(config.Name, v1beta1.FlinkApplicationRunning, v1beta1.FlinkApplicationDeployFailed), IsNil) | ||
|
||
c.Assert(s.Util.WaitForAllTasksRunning(config.Name), IsNil) | ||
|
||
currApp, _ := s.Util.GetFlinkApplication(config.Name) | ||
|
@@ -163,7 +166,7 @@ func (s *IntegSuite) TestCancelledJobWithoutSavepoint(c *C) { | |
c.Assert(err, IsNil) | ||
|
||
// wait a bit | ||
time.Sleep(1 * time.Second) | ||
time.Sleep(5 * time.Second) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't have to change anything but generally speaking I am never a fan of such sleep timers in tests (just makes it flakey). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. Will leave as a future update or at least keep in mind while writing future integration tests for this repo |
||
|
||
job = s.Util.GetJobOverview(currApp) | ||
c.Assert(job["status"], Equals, "CANCELED") | ||
|
@@ -205,10 +208,12 @@ func (s *IntegSuite) TestCancelledJobWithoutSavepoint(c *C) { | |
} | ||
} | ||
log.Info("All pods torn down") | ||
log.Info("Completed test TestCancelledJobWithoutSavepoint") | ||
} | ||
|
||
// tests the recovery workflow of the job when savepoint is disabled. | ||
func (s *IntegSuite) TestJobRecoveryWithoutSavepoint(c *C) { | ||
log.Info("Starting test TestJobRecoveryWithoutSavepoint") | ||
|
||
const finalizer = "simple.finalizers.test.com" | ||
const testName = "cancelrecovery" | ||
|
@@ -300,4 +305,5 @@ func (s *IntegSuite) TestJobRecoveryWithoutSavepoint(c *C) { | |
time.Sleep(100 * time.Millisecond) | ||
} | ||
log.Info("All pods torn down") | ||
log.Info("Completed test TestJobRecoveryWithoutSavepoint") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get this test, you're creating and modifying privs on a file and then just asserting the commands ran without errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes the behavior of the flink app: https://github.com/lyft/flinkk8soperator/blob/master/integ/operator-test-app/src/main/java/com/lyft/OperatorTestApp.java#L92