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

stop database containers when spock execution ends (#2843) #2844

Merged
merged 1 commit into from
May 12, 2022

Conversation

StevenMassaro
Copy link
Contributor

The existing integration test framework was configured to stop TestSystem's when the cleanup: method was called. Spock internally called this method when it finished executing all of the tests in a class. Thus, when a particular test class was completed, its TestSystem was stopped, which in some cases was premature, since other classes might use the same TestSystem.

Instead, the TestSystem's should be stopped when Spock finishes executing all of the tests in all classes.

(cherry picked from commit d2bea1a)

Environment

Liquibase Version:

Liquibase Integration & Version: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.>

Liquibase Extension(s) & Version:

Database Vendor & Version:

Operating System Type & Version:

Pull Request Type

  • Bug fix (non-breaking change which fixes an issue.)
  • Enhancement/New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

A clear and concise description of the issue being addressed. Additional guidance here.

  • Describe the actual problematic behavior.
  • Ensure private information is redacted.

Steps To Reproduce

List the steps to reproduce the behavior.

  • Please be precise and ensure private information is redacted
  • Include things like
    • Files used - sql scripts, changelog file(s), property file(s), config files, POM Files
    • Exact commands used - CLI, maven, gradle, spring boot, servlet, etc.

Actual Behavior

A clear and concise description of what happens in the software before this pull request.

  • Include console output if relevant
  • Include log files if available.

Expected/Desired Behavior

A clear and concise description of what happens in the software after this pull request.

Screenshots (if appropriate)

If applicable, add screenshots to help explain your problem.

Additional Context

Add any other context about the problem here.

Fast Track PR Acceptance Checklist:

Need Help?

Come chat with us in the Liquibase Forum.

The existing integration test framework was configured to stop TestSystem's when the cleanup: method was called. Spock internally called this method when it finished executing all of the tests in a class. Thus, when a particular test class was completed, its TestSystem was stopped, which in some cases was premature, since other classes might use the same TestSystem.

Instead, the TestSystem's should be stopped when Spock finishes executing all of the tests in all classes.

(cherry picked from commit d2bea1a)
@StevenMassaro StevenMassaro requested review from nvoxland, abrackx, suryaaki2 and wwillard7800 and removed request for nvoxland May 12, 2022 18:07
@StevenMassaro StevenMassaro merged commit e63de2b into DAT-9298 May 12, 2022
@StevenMassaro StevenMassaro deleted the DAT-9298-fix-test-containers branch May 12, 2022 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants