From cb9baba6a06f25bfaf55f40ba9c2a6484e9a5bd8 Mon Sep 17 00:00:00 2001 From: Matt Gulbronson Date: Tue, 28 Oct 2025 21:25:52 -0400 Subject: [PATCH] Always reset object test fixtures --- .../src/main/kotlin/misk/testing/MiskTestExtension.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/misk-testing/src/main/kotlin/misk/testing/MiskTestExtension.kt b/misk-testing/src/main/kotlin/misk/testing/MiskTestExtension.kt index 739e4f6864e..a68ec31cbbe 100644 --- a/misk-testing/src/main/kotlin/misk/testing/MiskTestExtension.kt +++ b/misk-testing/src/main/kotlin/misk/testing/MiskTestExtension.kt @@ -172,9 +172,7 @@ internal class MiskTestExtension : BeforeEachCallback, AfterEachCallback { // Starting services first given some fixtures rely on services being started. For example, // the dynamo DB fixture needs the service to be started, in order to be able to delete data. startServicesBeforeEach.beforeEach(context) - if (context.reuseInjector()) { - testFixtures.forEach { it.reset() } - } + testFixtures.forEach { it.reset() } // Call the beforeEach callbacks after resetting fixtures, so that things like seeding test // data can be done in these callback and not be reset. beforeEachCallbacks.forEach { it.beforeEach(context) }