You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by galen-pivotal <gi...@git.apache.org> on 2016/12/13 23:05:23 UTC

[GitHub] geode pull request #313: [GEODE-1407] Change a FlakyTest to distributedTest.

GitHub user galen-pivotal opened a pull request:

    https://github.com/apache/geode/pull/313

    [GEODE-1407] Change a FlakyTest to distributedTest.

    * remove `FlakyTest` from `ReconnectDUnitTest.testReconnectALocator`.
    * use Awaitility instead of Wait.
    
    This test doesn't seem to have failed in a while and I haven't been able to reproduce on my machine. Hopefully it was due to another test and we never have to worry about this again.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/galen-pivotal/incubator-geode feature/GEODE-1407

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/geode/pull/313.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #313
    
----
commit 57ef4fcc6357344fb7dad2236266b69cf2c322e7
Author: Galen O'Sullivan <go...@pivotal.io>
Date:   2016-12-13T22:49:25Z

    [GEODE-1407] Change a FlakyTest to distributedTest.
    
    * remove `FlakyTest` from `ReconnectDUnitTest.testReconnectALocator`.
    * use Awaitility instead of Wait.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] geode pull request #313: [GEODE-1407] Change a FlakyTest to distributedTest.

Posted by galen-pivotal <gi...@git.apache.org>.
Github user galen-pivotal closed the pull request at:

    https://github.com/apache/geode/pull/313


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] geode pull request #313: [GEODE-1407] Change a FlakyTest to distributedTest.

Posted by galen-pivotal <gi...@git.apache.org>.
Github user galen-pivotal commented on a diff in the pull request:

    https://github.com/apache/geode/pull/313#discussion_r94888520
  
    --- Diff: geode-core/src/test/java/org/apache/geode/cache30/ReconnectDUnitTest.java ---
    @@ -534,41 +532,35 @@ public Object call() throws CacheException {
                 Cache cache = getCache();
                 Region myRegion = cache.getRegion("root/myRegion");
                 myRegion.put("MyKey1", "MyValue1");
    -            // myRegion.put("Mykey2", "MyValue2");
                 return savedSystem.getDistributedMember();
               }
             };
         vm1.invoke(create1);
     
    -
         try {
    -
           dm = getDMID(vm0);
           createGfshWaitingThread(vm0);
           forceDisconnect(vm0);
           newdm = waitForReconnect(vm0);
           assertGfshWaitingThreadAlive(vm0);
     
    -      vm0.invoke(new SerializableRunnable("check for running locator") {
    -        public void run() {
    -          WaitCriterion wc = new WaitCriterion() {
    -            public boolean done() {
    -              return Locator.getLocator() != null;
    -            }
    -
    -            public String description() {
    -              return "waiting for locator to restart";
    -            }
    -          };
    -          Wait.waitForCriterion(wc, 30000, 1000, false);
    +      boolean running = (Boolean) vm0.invoke(new SerializableCallable("check for running locator") {
    --- End diff --
    
    Done, and I changed the rest of the method to be consistent.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] geode pull request #313: [GEODE-1407] Change a FlakyTest to distributedTest.

Posted by kohlmu-pivotal <gi...@git.apache.org>.
Github user kohlmu-pivotal commented on a diff in the pull request:

    https://github.com/apache/geode/pull/313#discussion_r94819019
  
    --- Diff: geode-core/src/test/java/org/apache/geode/cache30/ReconnectDUnitTest.java ---
    @@ -534,41 +532,35 @@ public Object call() throws CacheException {
                 Cache cache = getCache();
                 Region myRegion = cache.getRegion("root/myRegion");
                 myRegion.put("MyKey1", "MyValue1");
    -            // myRegion.put("Mykey2", "MyValue2");
                 return savedSystem.getDistributedMember();
               }
             };
         vm1.invoke(create1);
     
    -
         try {
    -
           dm = getDMID(vm0);
           createGfshWaitingThread(vm0);
           forceDisconnect(vm0);
           newdm = waitForReconnect(vm0);
           assertGfshWaitingThreadAlive(vm0);
     
    -      vm0.invoke(new SerializableRunnable("check for running locator") {
    -        public void run() {
    -          WaitCriterion wc = new WaitCriterion() {
    -            public boolean done() {
    -              return Locator.getLocator() != null;
    -            }
    -
    -            public String description() {
    -              return "waiting for locator to restart";
    -            }
    -          };
    -          Wait.waitForCriterion(wc, 30000, 1000, false);
    +      boolean running = (Boolean) vm0.invoke(new SerializableCallable("check for running locator") {
    --- End diff --
    
    This can be written as a "proper" Lambda if you wanted to continue the refactor. vm0.invoke("check for running locator", () -> {...});


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] geode issue #313: [GEODE-1407] Change a FlakyTest to distributedTest.

Posted by galen-pivotal <gi...@git.apache.org>.
Github user galen-pivotal commented on the issue:

    https://github.com/apache/geode/pull/313
  
    Merged after rebase.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---