Skip to content
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

control-service: ability to deploy a data job before all it tests #539

Merged
merged 1 commit into from
Nov 19, 2021

Conversation

mivanov1988
Copy link
Collaborator

Currently the integration tests that need deployed data job are combined
into a one test or they use mocked objects. Since the data job
deployment is a time consuming operation and we cannot do it before each test.

This change aims to deploy one data job before all tests. Then the tests
that need already deployed data job will reuse it.
Each test should extend the BaseDataJobDeploymentIT class.
The BaseDataJobDeploymentIT uses Spring Extension
(https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/context/junit/jupiter/SpringExtension.html)
to hook up to the beforeAll/Each phase and deploy a data job just
once.

Testing: ran integration tests locally

Signed-off-by: Miroslav Ivanov [email protected]

@mivanov1988 mivanov1988 force-pushed the person/miroslavi/intengration-tests-extentions branch from 31139fc to 6458ddf Compare November 19, 2021 15:07
@mivanov1988 mivanov1988 force-pushed the person/miroslavi/intengration-tests-extentions branch 3 times, most recently from 1fb5a79 to e55849f Compare November 19, 2021 16:37
Copy link
Collaborator

@antoniivanov antoniivanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I have one more comment that would be lovely if you address (if you agree). But it's not biggy.

Thanks a lot for doing this. Now trying to understand and extend the integration tests would be easier

@mivanov1988 mivanov1988 force-pushed the person/miroslavi/intengration-tests-extentions branch 2 times, most recently from fb846cf to 13e4e9c Compare November 19, 2021 22:00
Currently the integration tests that need deployed data job are combined
into a one test or they use mocked objects. Since the data job
deployment is a time consuming operation and we cannot do it before each test.

This change aims to deploy one data job before all tests. Then the tests
that need already deployed data job will reuse it.
Each test should extend the `BaseDataJobDeploymentIT` class.
The `BaseDataJobDeploymentIT` uses Spring Extension
(https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/context/junit/jupiter/SpringExtension.html)
to hook up to the `beforeAll/Each` phase and deploy a data job just
once.

Testing: ran integration tests locally

Signed-off-by: Miroslav Ivanov [email protected]
@mivanov1988 mivanov1988 force-pushed the person/miroslavi/intengration-tests-extentions branch from 13e4e9c to 8e59df2 Compare November 19, 2021 22:24
@mivanov1988 mivanov1988 merged commit 49d0f86 into main Nov 19, 2021
@mivanov1988 mivanov1988 deleted the person/miroslavi/intengration-tests-extentions branch November 19, 2021 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants