Skip to content

Commit ac2c802

Browse files
committed
refactor: inMemory support(2)
1 parent a45663c commit ac2c802

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

core/flamingock-test-support/src/main/java/io/flamingock/support/stages/ThenStageImpl.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,7 @@ public void verify() throws AssertionError {
6666

6767
}
6868

69-
ValidationHandler validationHandler = exception != null
70-
? new ValidationHandler(testContext, validators)
71-
: new ValidationHandler(testContext, validators, exception);
72-
73-
validationHandler.validate();
69+
new ValidationHandler(testContext, validators, exception).validate();
7470
testContext.cleanUp();
75-
7671
}
7772
}

core/flamingock-test-support/src/test/java/io/flamingock/support/integration/FlamingockTestSupportIntegrationTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import io.flamingock.common.test.pipeline.CodeChangeTestDefinition;
1919
import io.flamingock.common.test.pipeline.PipelineTestHelper;
20-
import io.flamingock.core.kit.inmemory.InMemoryTestKit;
20+
import io.flamingock.core.kit.inmemory.InternalInMemoryTestKit;
2121
import io.flamingock.internal.common.core.util.Deserializer;
2222
import io.flamingock.internal.core.runner.PipelineExecutionException;
2323
import io.flamingock.support.FlamingockTestSupport;
@@ -39,7 +39,7 @@ class FlamingockTestSupportIntegrationTest {
3939
@Test
4040
@DisplayName("Should execute non-transactional change")
4141
void shouldExecuteNonTransactionalChange() {
42-
InMemoryTestKit testKit = InMemoryTestKit.create();
42+
InternalInMemoryTestKit testKit = InternalInMemoryTestKit.create();
4343

4444
try (MockedStatic<Deserializer> mocked = Mockito.mockStatic(Deserializer.class)) {
4545
mocked.when(Deserializer::readPreviewPipelineFromFile).thenReturn(
@@ -64,7 +64,7 @@ void shouldExecuteNonTransactionalChange() {
6464
@Test
6565
@DisplayName("Should verify multiple changes execute in correct sequence with complete audit flow")
6666
void shouldVerifyMultipleChangesInSequence() {
67-
InMemoryTestKit testKit = InMemoryTestKit.create();
67+
InternalInMemoryTestKit testKit = InternalInMemoryTestKit.create();
6868

6969
try (MockedStatic<Deserializer> mocked = Mockito.mockStatic(Deserializer.class)) {
7070
mocked.when(Deserializer::readPreviewPipelineFromFile).thenReturn(
@@ -91,7 +91,7 @@ void shouldVerifyMultipleChangesInSequence() {
9191
@Test
9292
@DisplayName("Should verify failing transactional change triggers rollback with correct audit trail")
9393
void shouldVerifyFailingTransactionalChangeTriggersRollback() {
94-
InMemoryTestKit testKit = InMemoryTestKit.create();
94+
InternalInMemoryTestKit testKit = InternalInMemoryTestKit.create();
9595

9696
try (MockedStatic<Deserializer> mocked = Mockito.mockStatic(Deserializer.class)) {
9797
mocked.when(Deserializer::readPreviewPipelineFromFile).thenReturn(
@@ -119,7 +119,7 @@ void shouldVerifyFailingTransactionalChangeTriggersRollback() {
119119
@Test
120120
@DisplayName("Should verify already-applied changes are skipped on subsequent runs")
121121
void shouldVerifyAlreadyAppliedChangesAreSkipped() {
122-
InMemoryTestKit testKit = InMemoryTestKit.create();
122+
InternalInMemoryTestKit testKit = InternalInMemoryTestKit.create();
123123

124124
try (MockedStatic<Deserializer> mocked = Mockito.mockStatic(Deserializer.class)) {
125125
mocked.when(Deserializer::readPreviewPipelineFromFile).thenReturn(
@@ -148,7 +148,7 @@ void shouldVerifyAlreadyAppliedChangesAreSkipped() {
148148
@Test
149149
@DisplayName("Should verify dependency injection works correctly in rollback for non-transactional changes")
150150
void shouldVerifyDependencyInjectionInRollbackForNonTransactionalChanges() {
151-
InMemoryTestKit testKit = InMemoryTestKit.create();
151+
InternalInMemoryTestKit testKit = InternalInMemoryTestKit.create();
152152
Counter counter = new Counter();
153153

154154
NonTransactionalTargetSystem targetSystem = new NonTransactionalTargetSystem("kafka")
@@ -182,7 +182,7 @@ void shouldVerifyDependencyInjectionInRollbackForNonTransactionalChanges() {
182182
@Test
183183
@DisplayName("Should verify transactional change executes successfully with correct audit entries")
184184
void shouldVerifyTransactionalChangeExecutesSuccessfully() {
185-
InMemoryTestKit testKit = InMemoryTestKit.create();
185+
InternalInMemoryTestKit testKit = InternalInMemoryTestKit.create();
186186

187187
try (MockedStatic<Deserializer> mocked = Mockito.mockStatic(Deserializer.class)) {
188188
mocked.when(Deserializer::readPreviewPipelineFromFile).thenReturn(

0 commit comments

Comments
 (0)