You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/12/06 19:20:56 UTC

[GitHub] [geode] jdeppe-pivotal opened a new pull request #7168: GEODE-9866: Improvements to AbstractRedisMemoryStatsIntegrationTest

jdeppe-pivotal opened a new pull request #7168:
URL: https://github.com/apache/geode/pull/7168


   - Just use SET to create a bunch of content
   
   <!-- Thank you for submitting a contribution to Apache Geode. -->
   
   <!-- In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken: 
   -->
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   <!-- Note:
   Please ensure that once the PR is submitted, check Concourse for build issues and
   submit an update to your PR as soon as possible. If you need help, please send an
   email to dev@geode.apache.org.
   -->
   


-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jdeppe-pivotal commented on a change in pull request #7168: GEODE-9866: Improvements to AbstractRedisMemoryStatsIntegrationTest

Posted by GitBox <gi...@apache.org>.
jdeppe-pivotal commented on a change in pull request #7168:
URL: https://github.com/apache/geode/pull/7168#discussion_r763499954



##########
File path: geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractRedisMemoryStatsIntegrationTest.java
##########
@@ -70,24 +67,13 @@ public void memoryFragmentationRatio_shouldBeGreaterThanZero() {
 
   @Test
   public void usedMemory_shouldIncrease_givenAdditionalValuesAdded() {
-    Map<String, String> addedData = makeHashMap(100_000, "field", "value");
-
     long initialUsedMemory = Long.parseLong(RedisTestHelper.getInfo(jedis).get(USED_MEMORY));
-
-    jedis.hset(EXISTING_HASH_KEY, addedData);
+    for (int i = 0; i < 500_000; i++) {

Review comment:
       I'm now checking every 50,000 entries up to a max of 1mil. Bailing out as soon as the condition is met.




-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dschneider-pivotal commented on a change in pull request #7168: GEODE-9866: Improvements to AbstractRedisMemoryStatsIntegrationTest

Posted by GitBox <gi...@apache.org>.
dschneider-pivotal commented on a change in pull request #7168:
URL: https://github.com/apache/geode/pull/7168#discussion_r763438465



##########
File path: geode-for-redis/src/integrationTest/java/org/apache/geode/redis/internal/commands/executor/server/AbstractRedisMemoryStatsIntegrationTest.java
##########
@@ -70,24 +67,13 @@ public void memoryFragmentationRatio_shouldBeGreaterThanZero() {
 
   @Test
   public void usedMemory_shouldIncrease_givenAdditionalValuesAdded() {
-    Map<String, String> addedData = makeHashMap(100_000, "field", "value");
-
     long initialUsedMemory = Long.parseLong(RedisTestHelper.getInfo(jedis).get(USED_MEMORY));
-
-    jedis.hset(EXISTING_HASH_KEY, addedData);
+    for (int i = 0; i < 500_000; i++) {

Review comment:
       would it be better to do even more than 500,000 but to check after each set if usedMemory is greater than initialUsedMemory. As soon as you see it > you could break out of the loop. This might make it less likely to be flakey.




-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jdeppe-pivotal merged pull request #7168: GEODE-9866: Improvements to AbstractRedisMemoryStatsIntegrationTest

Posted by GitBox <gi...@apache.org>.
jdeppe-pivotal merged pull request #7168:
URL: https://github.com/apache/geode/pull/7168


   


-- 
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: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org