Skip to content

Commit bfe9f34

Browse files
authored
fix: Prevent NullPointerException in cleanupSpec for non-@Integration 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.
1 parent da88ba0 commit bfe9f34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/testFixtures/groovy/grails/plugin/geb/ContainerGebSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class ContainerGebSpec extends GebSpec {
7979
}
8080

8181
def cleanupSpec() {
82-
webDriverContainer.stop()
82+
webDriverContainer?.stop()
8383
}
8484

8585
/**

0 commit comments

Comments
 (0)