[ 
https://issues.apache.org/jira/browse/GEODE-8060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17101020#comment-17101020
 ] 

ASF GitHub Bot commented on GEODE-8060:
---------------------------------------

kirklund commented on a change in pull request #5041:
URL: https://github.com/apache/geode/pull/5041#discussion_r420955598



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java
##########
@@ -2377,15 +2381,25 @@ public void close(String reason, Throwable 
systemFailureCause, boolean keepAlive
       } finally {
         CLOSING_THREAD.remove();
       }
+      return true;
     }
   }
 
-  private void waitUntilClosed() {
-    try {
-      isClosedLatch.await();
-    } catch (InterruptedException ignore) {
-      // ignored
+  /**
+   * Returns true if caller waited on the {@code isClosedLatch}.
+   */
+  private boolean waitIfClosing(boolean skipAwait) {
+    if (isClosing) {
+      if (!skipAwait && !Thread.currentThread().equals(CLOSING_THREAD.get())) {
+        try {
+          isClosedLatch.await();
+        } catch (InterruptedException ignore) {
+          // ignored

Review comment:
       The interrupt flag should be reset after catching `InterruptedException`




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


> GemFireCacheImplCloseTest.close_blocksUntilFirstCallToCloseCompletes fails 
> intermittently
> -----------------------------------------------------------------------------------------
>
>                 Key: GEODE-8060
>                 URL: https://issues.apache.org/jira/browse/GEODE-8060
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>            Reporter: Kirk Lund
>            Assignee: Kirk Lund
>            Priority: Major
>
> {noformat}
> org.apache.geode.internal.cache.GemFireCacheImplCloseTest > 
> close_blocksUntilFirstCallToCloseCompletes FAILED
>     org.junit.ComparisonFailure: [ThreadId1=47 and threadId2=49] 
> expected:<4[7]L> but was:<4[9]L>
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>         at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at 
> org.apache.geode.internal.cache.GemFireCacheImplCloseTest.close_blocksUntilFirstCallToCloseCompletes(GemFireCacheImplCloseTest.java:225)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to