Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ gradle-app.setting
# Cache of project
.gradletasknamecache

.idea/
.idea/
*.iml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class TestcontainersMethodInterceptor extends AbstractMethodInterceptor {
invocation.proceed()
}

@Override
void interceptCleanupSpecMethod(IMethodInvocation invocation) throws Throwable {
def containers = findAllContainers(true)
stopContainers(containers, invocation)
Expand Down Expand Up @@ -74,7 +75,7 @@ class TestcontainersMethodInterceptor extends AbstractMethodInterceptor {
private static void startContainers(List<FieldInfo> containers, IMethodInvocation invocation) {
containers.each { FieldInfo f ->
GenericContainer container = readContainerFromField(f, invocation)
if(!container.isRunning()){
if (!container.isRunning()) {
container.start()
}
}
Expand All @@ -101,7 +102,6 @@ class TestcontainersMethodInterceptor extends AbstractMethodInterceptor {
}
}


private static GenericContainer readContainerFromField(FieldInfo f, IMethodInvocation invocation) {
f.readValue(invocation.instance) as GenericContainer
}
Expand Down