Skip to content

Commit

Permalink
fix: Prevent NullPointerException in cleanupSpec for non-`@Integr…
Browse files Browse the repository at this point in the history
…ation` tests (#66)

If a test is not annotated with `@Integration`, the `webDriverContainer` is null in `cleanupSpec`. This fix ensures that `cleanupSpec` checks for a null `webDriverContainer`, preventing a NullPointerException during cleanup for non-`@Integration` tests.
  • Loading branch information
matrei authored Oct 26, 2024
1 parent da88ba0 commit bfe9f34
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class ContainerGebSpec extends GebSpec {
}

def cleanupSpec() {
webDriverContainer.stop()
webDriverContainer?.stop()
}

/**
Expand Down

0 comments on commit bfe9f34

Please sign in to comment.