diff --git a/src/test/groovy/org/prebid/server/functional/testcontainers/PbsServiceFactory.groovy b/src/test/groovy/org/prebid/server/functional/testcontainers/PbsServiceFactory.groovy index e0911a2b1ca..2e499815e39 100644 --- a/src/test/groovy/org/prebid/server/functional/testcontainers/PbsServiceFactory.groovy +++ b/src/test/groovy/org/prebid/server/functional/testcontainers/PbsServiceFactory.groovy @@ -50,6 +50,9 @@ class PbsServiceFactory { static void removeContainer(Map config) { def container = containers.get(config) + if (container == null) { + throw new IllegalArgumentException("Unknown or invalid container config: " + config) + } container.stop() containers.remove(config) }