This is an automated email from the ASF dual-hosted git repository.
lgallinat pushed a commit to branch feature/GEODE-4020
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-4020 by this
push:
new 64a7913 GEODE-4020 Review changes and spotless formatting
64a7913 is described below
commit 64a7913747ca7400ef37f553e8e696bc89bc37df
Author: Lynn Gallinat <[email protected]>
AuthorDate: Tue Dec 5 17:11:43 2017 -0800
GEODE-4020 Review changes and spotless formatting
---
.../cli/DestroyConnectionFunctionTest.java | 2 +-
.../cli/ListConnectionCommandDUnitTest.java | 8 +++---
.../cli/ListConnectionCommandIntegrationTest.java | 31 +++++-----------------
3 files changed, 11 insertions(+), 30 deletions(-)
diff --git
a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyConnectionFunctionTest.java
b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyConnectionFunctionTest.java
index 9f0a056..86b8212 100644
---
a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyConnectionFunctionTest.java
+++
b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/DestroyConnectionFunctionTest.java
@@ -99,7 +99,7 @@ public class DestroyConnectionFunctionTest {
}
@Test
- public void destroyConnectionConfigReturnsTrueIfConnectionDoesNotExist()
throws Exception {
+ public void destroyConnectionConfigReturnsFalseIfConnectionDoesNotExist()
throws Exception {
assertThat(function.destroyConnectionConfig(service,
connectionName)).isFalse();
}
diff --git
a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandDUnitTest.java
b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandDUnitTest.java
index fb06c1a..12387de 100644
---
a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandDUnitTest.java
+++
b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandDUnitTest.java
@@ -85,9 +85,8 @@ public class ListConnectionCommandDUnitTest implements
Serializable {
commandResultAssert.statusIsSuccess();
commandResultAssert.tableHasRowCount(LIST_OF_CONNECTIONS, 3);
- commandResultAssert.tableHasColumnOnlyWithValues(LIST_OF_CONNECTIONS,
- connectionName + "-1", connectionName + "-2",
- connectionName + "-3");
+ commandResultAssert.tableHasColumnOnlyWithValues(LIST_OF_CONNECTIONS,
connectionName + "-1",
+ connectionName + "-2", connectionName + "-3");
}
@Test
@@ -114,8 +113,7 @@ public class ListConnectionCommandDUnitTest implements
Serializable {
InternalJdbcConnectorService service =
cache.getService(InternalJdbcConnectorService.class);
for (int i = 1; i <= N; i++) {
String name = connectionName + "-" + i;
- service.createConnectionConfig(
- new ConnectionConfigBuilder().withName(name).build());
+ service.createConnectionConfig(new
ConnectionConfigBuilder().withName(name).build());
assertThat(service.getConnectionConfig(name)).isNotNull();
}
}
diff --git
a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandIntegrationTest.java
b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandIntegrationTest.java
index 9d699d5..d835509 100644
---
a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandIntegrationTest.java
+++
b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/internal/cli/ListConnectionCommandIntegrationTest.java
@@ -73,7 +73,10 @@ public class ListConnectionCommandIntegrationTest {
assertThat(result.getStatus()).isSameAs(Result.Status.OK);
CommandResult commandResult = (CommandResult) result;
-
assertThat(commandResult.getTableContent().toString()).contains(NO_CONNECTIONS_FOUND);
+ String tableContent = commandResult.getTableContent().toString();
+ assertThat(tableContent).contains(NO_CONNECTIONS_FOUND);
+ assertThat(tableContent).doesNotContain(connectionConfig1.getName())
+
.doesNotContain(connectionConfig2.getName()).doesNotContain(connectionConfig3.getName());
}
@Test
@@ -84,18 +87,9 @@ public class ListConnectionCommandIntegrationTest {
assertThat(result.getStatus()).isSameAs(Result.Status.OK);
CommandResult commandResult = (CommandResult) result;
-
assertThat(commandResult.getTableContent().toString()).contains(LIST_OF_CONNECTIONS);
- }
-
- @Test
- public void displaysOneConnectionByName() throws Exception {
- service.createConnectionConfig(connectionConfig1);
-
- Result result = command.listConnection();
-
- assertThat(result.getStatus()).isSameAs(Result.Status.OK);
- CommandResult commandResult = (CommandResult) result;
-
assertThat(commandResult.getTableContent().toString()).contains(connectionConfig1.getName());
+ String tableContent = commandResult.getTableContent().toString();
+ assertThat(tableContent).contains(LIST_OF_CONNECTIONS);
+ assertThat(tableContent).contains(connectionConfig1.getName());
}
@Test
@@ -111,15 +105,4 @@ public class ListConnectionCommandIntegrationTest {
assertThat(commandResult.getTableContent().toString()).contains(connectionConfig1.getName())
.contains(connectionConfig2.getName()).contains(connectionConfig3.getName());
}
-
- @Test
- public void displaysEmptyListWhenZeroConnectionsExist() throws Exception {
- Result result = command.listConnection();
-
- assertThat(result.getStatus()).isSameAs(Result.Status.OK);
- CommandResult commandResult = (CommandResult) result;
- assertThat(commandResult.getTableContent().toString())
-
.doesNotContain(connectionConfig1.getName()).doesNotContain(connectionConfig2.getName())
- .doesNotContain(connectionConfig3.getName());
- }
}
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].