geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [06/32] geode git commit: GEODE-2395: add FlakyCategory to intermittently failing test
Date Fri, 03 Feb 2017 18:35:35 GMT
GEODE-2395: add FlakyCategory to intermittently failing test

Remove unnecessary throws clause. Change from throws
Throwable to throws Exception on JUnit methods.


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/296b15e2
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/296b15e2
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/296b15e2

Branch: refs/heads/feature/GEODE-1930-2
Commit: 296b15e2b47a627e1059907f1a846b2d1c47bba0
Parents: 66106bc
Author: Kirk Lund <klund@apache.org>
Authored: Mon Jan 30 17:03:55 2017 -0800
Committer: Kirk Lund <klund@apache.org>
Committed: Tue Jan 31 10:55:02 2017 -0800

----------------------------------------------------------------------
 .../apache/geode/tools/pulse/PulseDataExportTest.java    | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/296b15e2/geode-assembly/src/test/java/org/apache/geode/tools/pulse/PulseDataExportTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/org/apache/geode/tools/pulse/PulseDataExportTest.java
b/geode-assembly/src/test/java/org/apache/geode/tools/pulse/PulseDataExportTest.java
index 679f486..3c4fe70 100644
--- a/geode-assembly/src/test/java/org/apache/geode/tools/pulse/PulseDataExportTest.java
+++ b/geode-assembly/src/test/java/org/apache/geode/tools/pulse/PulseDataExportTest.java
@@ -27,6 +27,7 @@ import org.apache.geode.test.dunit.rules.GfshShellConnectionRule;
 import org.apache.geode.test.dunit.rules.Locator;
 import org.apache.geode.test.dunit.rules.LocatorServerStartupRule;
 import org.apache.geode.test.junit.categories.DistributedTest;
+import org.apache.geode.test.junit.categories.FlakyTest;
 import org.apache.http.Consts;
 import org.apache.http.Header;
 import org.apache.http.HttpResponse;
@@ -71,9 +72,8 @@ public class PulseDataExportTest extends JUnit4DistributedTestCase {
   private HttpClient httpClient;
   private CookieStore cookieStore;
 
-
   @Before
-  public void before() throws Throwable {
+  public void before() throws Exception {
     IgnoredException
         .addIgnoredException("Failed to properly release resources held by the HTTP service:");
     IgnoredException.addIgnoredException("!STOPPED");
@@ -100,8 +100,9 @@ public class PulseDataExportTest extends JUnit4DistributedTestCase {
     await().atMost(2, TimeUnit.MINUTES).until(this::pulseServerHasStarted);
   }
 
+  @Category(FlakyTest.class) // GEODE-2395
   @Test
-  public void dataBrowserExportWorksAsExpected() throws Throwable {
+  public void dataBrowserExportWorksAsExpected() throws Exception {
     getAuthenticatedJSESSIONID();
     HttpContext authenticatedHttpContext = buildAuthenticatedHttpContext();
 
@@ -135,14 +136,14 @@ public class PulseDataExportTest extends JUnit4DistributedTestCase {
     return new HttpGet(builder.build());
   }
 
-  private HttpContext buildAuthenticatedHttpContext() throws Throwable {
+  private HttpContext buildAuthenticatedHttpContext() {
     HttpContext localContext = new BasicHttpContext();
     localContext.setAttribute(HttpClientContext.COOKIE_STORE, cookieStore);
 
     return localContext;
   }
 
-  public void getAuthenticatedJSESSIONID() throws Throwable {
+  private void getAuthenticatedJSESSIONID() throws IOException {
     HttpResponse loginResponse = httpClient.execute(buildLoginPOST());
     assertThat(loginResponse.getStatusLine().getStatusCode()).describedAs(loginResponse.toString())
         .isEqualTo(302);


Mime
View raw message