Skip to content

Commit a934c11

Browse files
author
haiyang.zhou
committed
refactor: remove redundant ConcurrentHashMap test from StateHolderTest
StateHolder's Map-based constructor is already exercised indirectly through RespServerContextTest.processCommandParallelExecution. Testing JDK's ConcurrentHashMap put/get/remove semantics adds no value. Made-with: Cursor
1 parent a194bfe commit a934c11

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/test/java/com/github/tonivade/resp/StateHolderTest.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import org.junit.jupiter.api.Test;
1212

1313
import java.util.Optional;
14-
import java.util.concurrent.ConcurrentHashMap;
1514

1615
class StateHolderTest {
1716

@@ -54,15 +53,4 @@ void clear() {
5453
assertThat(state.getValue(KEY), equalTo(Optional.empty()));
5554
}
5655

57-
@Test
58-
void withConcurrentHashMap() {
59-
var concurrentState = new StateHolder(new ConcurrentHashMap<>());
60-
61-
concurrentState.putValue(KEY, VALUE);
62-
assertThat(concurrentState.getValue(KEY), equalTo(Optional.of(VALUE)));
63-
64-
concurrentState.removeValue(KEY);
65-
assertThat(concurrentState.getValue(KEY), equalTo(Optional.empty()));
66-
}
67-
6856
}

0 commit comments

Comments
 (0)