|
6 | 6 | import io.valkey.Jedis; |
7 | 7 | import io.valkey.JedisPool; |
8 | 8 | import java.nio.file.Paths; |
9 | | -import lombok.val; |
10 | 9 | import org.junit.jupiter.api.Test; |
11 | 10 | import org.junit.jupiter.api.io.TempDir; |
12 | 11 |
|
@@ -80,18 +79,6 @@ void shouldPersistData() { |
80 | 79 | } |
81 | 80 | } |
82 | 81 |
|
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 | | - |
95 | 82 | @Test |
96 | 83 | void shouldInitializeDatabaseWithPayload() throws Exception { |
97 | 84 | Path importFile = Paths.get(getClass().getResource("/initData.valkey").toURI()); |
@@ -137,4 +124,16 @@ void shouldMountValkeyConfigToContainer() throws Exception { |
137 | 124 | } |
138 | 125 | } |
139 | 126 | } |
| 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 | + } |
140 | 139 | } |
0 commit comments