Skip to content

Commit d52602a

Browse files
committed
refactor: move normal unit test below container tests; cleanup import
1 parent 1027e33 commit d52602a

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

modules/valkey/src/test/java/org/testcontainers/valkey/ValkeyContainerTest.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import io.valkey.Jedis;
77
import io.valkey.JedisPool;
88
import java.nio.file.Paths;
9-
import lombok.val;
109
import org.junit.jupiter.api.Test;
1110
import org.junit.jupiter.api.io.TempDir;
1211

@@ -80,18 +79,6 @@ void shouldPersistData() {
8079
}
8180
}
8281

83-
@Test
84-
void shouldValidateSnapshottingConfiguration() {
85-
ValkeyContainer container = new ValkeyContainer();
86-
assertThatThrownBy(() -> container.withSnapshotting(0, 10))
87-
.isInstanceOf(IllegalArgumentException.class)
88-
.hasMessageContaining("seconds must be greater than 0");
89-
90-
assertThatThrownBy(() -> container.withSnapshotting(10, 0))
91-
.isInstanceOf(IllegalArgumentException.class)
92-
.hasMessageContaining("changedKeys must be non-negative");
93-
}
94-
9582
@Test
9683
void shouldInitializeDatabaseWithPayload() throws Exception {
9784
Path importFile = Paths.get(getClass().getResource("/initData.valkey").toURI());
@@ -137,4 +124,16 @@ void shouldMountValkeyConfigToContainer() throws Exception {
137124
}
138125
}
139126
}
127+
128+
@Test
129+
void shouldValidateSnapshottingConfiguration() {
130+
ValkeyContainer container = new ValkeyContainer();
131+
assertThatThrownBy(() -> container.withSnapshotting(0, 10))
132+
.isInstanceOf(IllegalArgumentException.class)
133+
.hasMessageContaining("seconds must be greater than 0");
134+
135+
assertThatThrownBy(() -> container.withSnapshotting(10, 0))
136+
.isInstanceOf(IllegalArgumentException.class)
137+
.hasMessageContaining("changedKeys must be non-negative");
138+
}
140139
}

0 commit comments

Comments
 (0)