-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[cdc][e2e] Unify logic to clean docker image when connector e2e test finished #2978
Conversation
@@ -174,6 +177,33 @@ public void after() { | |||
mysqlInventoryDatabase.dropDatabase(); | |||
} | |||
|
|||
@AfterClass | |||
public static void afterClass() { | |||
// list all images and remove the ones that are not flink images and mysql image |
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.
Images with prefix testcontainers
also need to be excluded.
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.
Fine, add the condition. The docker image of testcontainers just 12MB.
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 mean exclude it to keep it not be deleted here, or else I'm not sure if there will be any exception occurs as it should still be in use. By the way, should the filters be combined with ||
or &&
?
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.
maybe use &&
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.
Great catch for this
|
emm,ob database container will not close after test. |
I'm not sure, maybe ClassRule is executed after AfterClass? If so we need to add After method to stop the ob container manually. |
@GOODBOY008 Maybe we can add @beforeClass for PostgresE2eITCase to start container. |
6d64059
to
aad2519
Compare
I think unify clean logic, just focus on final state. |
aad2519
to
69137fc
Compare
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.
LGTM
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.
LGTM
Unify logic to clean docker image when connector e2e test finished