kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | abc58841fcf303c61c7fcd0f32055398032876fd5948b436a026fa0bd44b58a9 |
|---|---|
| Author | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-06-27 14:46 -05:00 |
| Committer | Andrew Tolbert <andrew.tolbert@datastax.com> · 2015-06-27 14:46 -05:00 |
| Parents | 45311b7f8f96 |
1 file changed
modified driver-core/src/test/java/com/datastax/driver/core/policies/AbstractRetryPolicyIntegrationTest.java +15 −0
| @@ -22,6 +22,8 @@ | ||
| 22 | 22 | import com.google.common.collect.ImmutableMap; |
| 23 | 23 | import org.mockito.Mockito; |
| 24 | 24 | import org.scassandra.http.client.PrimingRequest; |
| 25 | +import org.testng.annotations.AfterClass; | |
| 26 | +import org.testng.annotations.AfterMethod; | |
| 25 | 27 | import org.testng.annotations.BeforeClass; |
| 26 | 28 | import org.testng.annotations.BeforeMethod; |
| 27 | 29 | |
| @@ -125,4 +127,17 @@ | ||
| 125 | 127 | protected void assertQueried(int hostNumber, int times) { |
| 126 | 128 | assertThat(scassandras.retrieveQueries(hostNumber)).hasSize(times); |
| 127 | 129 | } |
| 130 | + | |
| 131 | + @AfterMethod(groups = "short") | |
| 132 | + public void afterMethod() { | |
| 133 | + scassandras.clearAllPrimes(); | |
| 134 | + if (cluster != null) | |
| 135 | + cluster.close(); | |
| 136 | + } | |
| 137 | + | |
| 138 | + @AfterClass(groups = "short") | |
| 139 | + public void afterClass() { | |
| 140 | + if (scassandras != null) | |
| 141 | + scassandras.stop(); | |
| 142 | + } | |
| 128 | 143 | } |