You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed my issue with my Integration Tests Architectural overhaul. So, I changed it so that the Testcontainers setup will REUSE the same Spring context for each test. This is considered modern and professional. My original setup just destroyed the context and re-created it per test and everything ran smoothly then. But with the more modern change, it broke some tests esp in my GraphQL Integration Tests specifically because of the fact that the context was being created (or at least because some resource was being reused over and over, I'm actually not 100% sure), but I added annotations to clean things up before each test and it's all good now.
Copy file name to clipboardExpand all lines: springqpro-backend/src/test/java/com/springqprobackend/springqpro/integration/TaskGraphQLIntegrationTest.java
// 2025-11-19-NOTE:+DEBUG: Removing my Executor overwrites because they're just adding new warnings and stuff (and I get the errors they're meant to prevent anyways).
116
-
117
62
privateGraphQlTestergraphQlTester;
118
63
119
64
@LocalServerPort
@@ -122,18 +67,6 @@ public void execute(Runnable command) {
122
67
@Autowired
123
68
privateTaskRepositorytaskRepository;
124
69
125
-
/*@Container
126
-
static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:18")
0 commit comments