kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 7f6f4eda892be2aff269ee2ac0a53744781145b31ef5a294215ef21584b3d9c1 |
|---|---|
| Author | Alexandre Dutra <alexandre.dutra@datastax.com> · 2016-01-28 13:42 +01:00 |
| Committer | Alexandre Dutra <alexandre.dutra@datastax.com> · 2016-01-28 13:42 +01:00 |
| Parents | 75e84345ce38, 37c05c45453b |
2 files changed
modified driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java +1 −0
| @@ -405,6 +405,7 @@ | ||
| 405 | 405 | return; |
| 406 | 406 | if (logger.isDebugEnabled()) |
| 407 | 407 | logger.debug("Stopping: {} - free memory: {} MB", this, TestUtils.getFreeMemoryMB()); |
| 408 | + execute(CCM_COMMAND + " stop"); | |
| 408 | 409 | if (logger.isDebugEnabled()) |
| 409 | 410 | logger.debug("Stopped: {} - free memory: {} MB", this, TestUtils.getFreeMemoryMB()); |
| 410 | 411 | closed = true; |
modified driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java +12 −1
| @@ -854,9 +854,20 @@ | ||
| 854 | 854 | * Tests fail randomly with InvalidQueryException: Keyspace 'xxx' does not exist; |
| 855 | 855 | * this method tries at most 3 times to issue a successful USE statement. |
| 856 | 856 | * |
| 857 | - * @param ks The keyspace to use | |
| 857 | + * @param ks The keyspace to USE | |
| 858 | 858 | */ |
| 859 | 859 | public void useKeyspace(String ks) { |
| 860 | + useKeyspace(session(), ks); | |
| 861 | + } | |
| 862 | + | |
| 863 | + /** | |
| 864 | + * Tests fail randomly with InvalidQueryException: Keyspace 'xxx' does not exist; | |
| 865 | + * this method tries at most 3 times to issue a successful USE statement. | |
| 866 | + * | |
| 867 | + * @param session The session to use | |
| 868 | + * @param ks The keyspace to USE | |
| 869 | + */ | |
| 870 | + public void useKeyspace(Session session, String ks) { | |
| 860 | 871 | final int maxTries = 3; |
| 861 | 872 | for (int i = 1; i <= maxTries; i++) { |
| 862 | 873 | try { |