rmatharu commented on a change in pull request #1170: Samza-2330: Handle expired resource request for Container allocator when host affinity is disabled URL: https://github.com/apache/samza/pull/1170#discussion_r330825019
########## File path: samza-core/src/test/java/org/apache/samza/clustermanager/TestContainerAllocatorWithoutHostAffinity.java ########## @@ -290,4 +292,53 @@ public void testRequestAllocationWithRunStreamProcessor() throws Exception { assertTrue(state.preferredHostRequests.get() == 0); spyAllocator.stop(); } + + @Test + public void testExpiredRequestAllocationOnAnyHost() throws Exception { + MockClusterResourceManager spyManager = spy(new MockClusterResourceManager(callback, state)); + spyAllocator = Mockito.spy( + new ContainerAllocator(spyManager, config, state, false, Optional.empty())); + + // Request Resources + spyAllocator.requestResources(new HashMap<String, String>() { + { + put("0", "abc"); + put("1", "def"); + } Review comment: Please use "host-0" and "host-1" instead of abc and def. ---------------------------------------------------------------- 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 With regards, Apache Git Services