madrob commented on code in PR #2086: URL: https://github.com/apache/solr/pull/2086#discussion_r1401158281
########## solr/core/src/test/org/apache/solr/core/BlobRepositoryMockingTest.java: ########## @@ -151,15 +151,14 @@ public void testGetBlobIncrRefByUrl() throws Exception { @Test public void testCachedAlready() { when(mockContainer.isZooKeeperAware()).thenReturn(true); - when(mapMock.get("foo!")) - .thenReturn(new BlobRepository.BlobContent<BlobRepository>("foo!", blobData)); + mapMock.put("foo!", new BlobRepository.BlobContent<BlobRepository>("foo!", blobData)); BlobRepository.BlobContentRef<ByteBuffer> ref = repository.getBlobIncRef("foo!"); assertEquals("", blobKey); assertFalse(blobFetched); assertNotNull(ref.blob); assertEquals(blobData, ref.blob.get()); verify(mockContainer).isZooKeeperAware(); - verify(mapMock).get("foo!"); + assertTrue(mapMock.get("foo!") instanceof BlobRepository.BlobContent); Review Comment: nit: could be assertThat(mapMock.get, isInstance()) for better error message ########## solr/core/src/test/org/apache/solr/core/BlobRepositoryMockingTest.java: ########## @@ -71,7 +71,8 @@ public void setUp() throws Exception { super.setUp(); blobFetched = false; blobKey = ""; - reset(mocks); + reset(mockContainer); Review Comment: Can we clean up the assignments at line 51 and 54 since some of those are obsolete now I think? ########## solr/core/src/test/org/apache/solr/core/BlobRepositoryMockingTest.java: ########## @@ -191,8 +190,6 @@ public String getName() { assertTrue(blobFetched); assertNotNull(ref.blob); assertEquals(PARSED, ref.blob.get()); - verify(mockContainer).isZooKeeperAware(); - verify(mapMock).get("foo!mocked"); - verify(mapMock).put(eq("foo!mocked"), any(BlobRepository.BlobContent.class)); + verify(mockContainer).isZooKeeperAware();assertTrue(mapMock.get("foo!mocked") instanceof BlobRepository.BlobContent); Review Comment: nit: two statements on this line -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org