dschneider-pivotal commented on a change in pull request #6926:
URL: https://github.com/apache/geode/pull/6926#discussion_r725391748
##########
File path:
geode-for-redis/src/distributedTest/java/org/apache/geode/redis/OutOfMemoryDUnitTest.java
##########
@@ -103,7 +104,51 @@ public void
shouldReturnOOMError_forWriteOperations_whenThresholdReached()
fillMemory(jedis, false);
assertThatThrownBy(
- () -> jedis.set("{key}oneMoreKey", makeLongStringValue(2 *
LARGE_VALUE_SIZE)))
+ () -> jedis.set("{key}oneMoreKey", "value"))
+ .hasMessageContaining("OOM");
+
+ memoryPressureThread.interrupt();
+ memoryPressureThread.join();
Review comment:
added to: https://issues.apache.org/jira/browse/GEODE-9706
##########
File path:
geode-for-redis/src/distributedTest/java/org/apache/geode/redis/OutOfMemoryDUnitTest.java
##########
@@ -103,7 +104,51 @@ public void
shouldReturnOOMError_forWriteOperations_whenThresholdReached()
fillMemory(jedis, false);
assertThatThrownBy(
- () -> jedis.set("{key}oneMoreKey", makeLongStringValue(2 *
LARGE_VALUE_SIZE)))
+ () -> jedis.set("{key}oneMoreKey", "value"))
+ .hasMessageContaining("OOM");
+
+ memoryPressureThread.interrupt();
+ memoryPressureThread.join();
+ }
+
+ @Test
+ public void shouldReturnOOMError_forSubscribe_whenThresholdReached()
+ throws InterruptedException {
+ IgnoredException.addIgnoredException(expectedEx);
+ IgnoredException.addIgnoredException("LowMemoryException");
+ MockSubscriber mockSubscriber = new MockSubscriber();
+ int redisServerPort1 = clusterStartUp.getRedisPort(1);
+ JedisCluster subJedis =
+ new JedisCluster(new HostAndPort(BIND_ADDRESS, redisServerPort1),
REDIS_CLIENT_TIMEOUT);
+
+ memoryPressureThread = new Thread(makeMemoryPressureRunnable());
Review comment:
added to: https://issues.apache.org/jira/browse/GEODE-9706
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]