kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 1e9ad4f86e72e845dc00e9d665ba788be4be30f949e5c2f44822f4aea0c7b51a |
|---|---|
| Author | GregBestland <Greg.Bestland@datastax.com> · 2017-02-27 09:53 -06:00 |
| Committer | GregBestland <Greg.Bestland@datastax.com> · 2017-02-27 09:53 -06:00 |
| Parents | 1c2a711506e8 |
1 file changed
modified driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java +14 −7
| @@ -22,6 +22,7 @@ | ||
| 22 | 22 | import org.scassandra.http.client.Query; |
| 23 | 23 | import org.slf4j.Logger; |
| 24 | 24 | import org.slf4j.LoggerFactory; |
| 25 | +import org.testng.annotations.AfterClass; | |
| 25 | 26 | import org.testng.annotations.AfterMethod; |
| 26 | 27 | import org.testng.annotations.BeforeClass; |
| 27 | 28 | import org.testng.annotations.Test; |
| @@ -37,14 +38,19 @@ | ||
| 37 | 38 | private static final Logger logger = LoggerFactory.getLogger(ConsistencyTest.class); |
| 38 | 39 | private ScassandraCluster sCluster; |
| 39 | 40 | |
| 40 | - @BeforeClass | |
| 41 | + @BeforeClass(groups = "short") | |
| 41 | 42 | public void setUp() { |
| 42 | 43 | sCluster = ScassandraCluster.builder().withNodes(1).build(); |
| 43 | 44 | sCluster.init(); |
| 44 | 45 | |
| 45 | 46 | } |
| 46 | 47 | |
| 47 | - @AfterMethod | |
| 48 | + @AfterClass(groups = "short") | |
| 49 | + public void tearDownClass() { | |
| 50 | + sCluster.stop(); | |
| 51 | + } | |
| 52 | + | |
| 53 | + @AfterMethod(groups = "short") | |
| 48 | 54 | public void tearDown() { |
| 49 | 55 | clearActivityLog(); |
| 50 | 56 | } |
| @@ -63,12 +69,13 @@ | ||
| 63 | 69 | .withPort(sCluster.getBinaryPort()).withNettyOptions(nonQuietClusterCloseOptions); |
| 64 | 70 | } |
| 65 | 71 | |
| 72 | + /** | |
| 73 | + * This method checks the expected/sent serial consistency level against that which is received. | |
| 74 | + * ConsistencyLevel.SERIAL is the default serial consistency level, so even when sent it will return | |
| 75 | + * as null. | |
| 76 | + */ | |
| 66 | 77 | public void checkSerialCLMatch(ConsistencyLevel expected, String received) { |
| 67 | - /** | |
| 68 | - * This method checks the expected/sent serial consistency level against that which is received. | |
| 69 | - * ConsistencyLevel.SERIAL is the default serial consistency level, so even when sent it will return | |
| 70 | - * as null. | |
| 71 | - */ | |
| 78 | + | |
| 72 | 79 | if (expected.equals(ConsistencyLevel.SERIAL)) { |
| 73 | 80 | assertNull(received); |
| 74 | 81 |