[ https://issues.apache.org/jira/browse/GEODE-8538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17202260#comment-17202260 ]
ASF GitHub Bot commented on GEODE-8538: --------------------------------------- ringles commented on a change in pull request #5552: URL: https://github.com/apache/geode/pull/5552#discussion_r495082332 ########## File path: geode-redis/src/integrationTest/java/org/apache/geode/redis/CommandPipeliningIntegrationTest.java ########## @@ -93,6 +98,42 @@ public void whenPipelining_commandResponsesAreNotCorrupted() { assertThat(mockSubscriber.getReceivedMessages()).isEqualTo(expectedMessages); } + + @Test + public void should_returnResultsOfPipelinedCommands_inCorrectOrder() { + Logger logger = LogManager.getLogger("org.apache.geode.redis.internal"); + Configurator.setAllLevels(logger.getName(), Level.getLevel("DEBUG")); + FastLogger.setDelegating(true); + + Jedis jedis = new Jedis("localhost", server.getPort(), 10000000); + int NUMBER_OF_COMMANDS_IN_PIPELINE = 100; + int numberOfPipeLineRequests = 1000; + + do { + Pipeline p = jedis.pipelined(); + for (int i = 0; i < NUMBER_OF_COMMANDS_IN_PIPELINE; i++) { + p.echo(String.valueOf(i)); + } + + List<Object> results = p.syncAndReturnAll(); + + verifyResultOrder(NUMBER_OF_COMMANDS_IN_PIPELINE, results); + numberOfPipeLineRequests--; + } while (numberOfPipeLineRequests > 0); + + jedis.flushAll(); + jedis.close(); + } + + private void verifyResultOrder(int NUMBER_OF_COMMAND_IN_PIPELINE, List<Object> results) { Review comment: NUMBER_OF_COMMAND_IN_PIPELINE looks like a constant, but isn't. It should be something like "numberOfCommands" or "numberOfCommandsInPipeline". ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Create test to validate ordering of redis pipeline commands > ----------------------------------------------------------- > > Key: GEODE-8538 > URL: https://issues.apache.org/jira/browse/GEODE-8538 > Project: Geode > Issue Type: Test > Components: redis > Reporter: John Hutchison > Priority: Major > Labels: pull-request-available > -- This message was sent by Atlassian Jira (v8.3.4#803005)