This is an automated email from the ASF dual-hosted git repository.
sai_boorlagadda pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new 40fb4bd GEODE-3875: gfsh command to create jndi binding (#1507)
40fb4bd is described below
commit 40fb4bd8fe7b644350a3b4a3e444d1c7f8a78e96
Author: Sai Boorlagadda <[email protected]>
AuthorDate: Tue Feb 27 11:35:58 2018 -0800
GEODE-3875: gfsh command to create jndi binding (#1507)
Reworked on a response message text based on review.
---
.../internal/cli/commands/CreateJndiBindingCommand.java | 5 +++--
.../internal/cli/commands/CreateJndiBindingCommandTest.java | 8 ++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommand.java
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommand.java
index 19abfd9..c8459f7 100644
---
a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommand.java
+++
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommand.java
@@ -177,8 +177,9 @@ public class CreateJndiBindingCommand implements
GfshCommand {
result = buildResult(jndiCreationResult);
} else {
if (persisted)
- result =
- ResultBuilder.createInfoResult("No members found. Cluster
configuration is updated.");
+ result = ResultBuilder.createInfoResult(CliStrings.format(
+ "No members found. Cluster configuration is updated with
jndi-binding \"{0}\".",
+ jndiName));
else
result = ResultBuilder.createInfoResult("No members found.");
}
diff --git
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandTest.java
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandTest.java
index 53062c6..59acb0e 100644
---
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandTest.java
+++
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateJndiBindingCommandTest.java
@@ -302,7 +302,6 @@ public class CreateJndiBindingCommandTest {
gfsh.executeAndAssertThat(command,
COMMAND + " --type=SIMPLE --name=name --jdbc-driver-class=driver
--connection-url=url")
- // .statusIsSuccess().containsOutput("Cluster Configuration Service is
not available")
.statusIsSuccess().containsOutput("No members
found").hasFailToPersistError();
}
@@ -318,7 +317,12 @@ public class CreateJndiBindingCommandTest {
gfsh.executeAndAssertThat(command,
COMMAND + " --type=SIMPLE --name=name --jdbc-driver-class=driver
--connection-url=url")
- .statusIsSuccess();
+ .statusIsSuccess()
+ .containsOutput(
+ "No members found. Cluster configuration is updated with
jndi-binding \\\"name\\\".")
+ .hasNoFailToPersistError();
+
+ verify(command, times(1)).updateXml(any());
}
@Test
--
To stop receiving notification emails like this one, please contact
[email protected].