boglesby commented on a change in pull request #7235:
URL: https://github.com/apache/geode/pull/7235#discussion_r783513412



##########
File path: 
geode-core/src/test/java/org/apache/geode/internal/cache/LocalRegionTest.java
##########
@@ -290,4 +293,48 @@ public void 
forPdxInstanceByPassTheFutureInLocalRegionOptimizedGetObject() {
     assertThat(object).isNotSameAs(result);
     assertThat(object).isSameAs(newResult);
   }
+
+  @Test
+  public void 
verifyBasicBridgePutSetsVersionTagOnClientEventIfConcurrencyConflictAndPossibleDuplicate()
 {
+    // Create the region
+    LocalRegion region =

Review comment:
       Thanks for the comment.
   
   I looked into this a bit. I need to invoke the real 
LocalRegion.basicBridgePut. I could mock LocalRegion, but I get stuck on 
setting the entryEventFactory field which is directly referenced in that 
method. If I add a getter for that field, I see this when I run the test: 
   ```
   Following stubbings are unnecessary (click to navigate to relevant line of 
code):
     1. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:103)
     2. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:104)
     3. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:105)
     4. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:106)
     5. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:107)
     6. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:108)
     7. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:109)
     8. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:110)
     9. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:111)
     10. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:112)
     11. -> at 
org.apache.geode.internal.cache.LocalRegionTest.setUp(LocalRegionTest.java:113)
   ```
   These point to a bunch of `when/thenReturn` calls in setUp which a bunch of 
other tests use.
   
   If I remove those calls, the test passes, but then I'd have to modify all 
the other tests that use those calls.
   
   I think I'll leave it as is for now.




-- 
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]


Reply via email to