You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2016/05/20 02:35:48 UTC
[1/3] incubator-geode git commit: GEODE-1397: Adding new help text
from create async-event-queue
Repository: incubator-geode
Updated Branches:
refs/heads/develop 3a1c1a964 -> 5ebd3ff28
GEODE-1397: Adding new help text from create async-event-queue
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/5ebd3ff2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/5ebd3ff2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/5ebd3ff2
Branch: refs/heads/develop
Commit: 5ebd3ff28d3ed2e3a06a8a753277f717cf384647
Parents: cafda19
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed May 18 14:30:40 2016 -0700
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Thu May 19 19:34:51 2016 -0700
----------------------------------------------------------------------
.../cli/commands/golden-help-offline.properties | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5ebd3ff2/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties
----------------------------------------------------------------------
diff --git a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties
index a9dc64c..74db393 100644
--- a/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties
+++ b/geode-core/src/test/resources/com/gemstone/gemfire/management/internal/cli/commands/golden-help-offline.properties
@@ -540,9 +540,10 @@ SYNTAX\n\
\ \ \ \ create async-event-queue --id=value --listener=value [--group=value(nullvalue)*]\n\
\ \ \ \ [--parallel(=value)?] [--enable-batch-conflation(=value)?] [--batch-size=value]\n\
\ \ \ \ [--batch-time-interval=value] [--persistent(=value)?] [--disk-store=value]\n\
-\ \ \ \ [--disk-synchronous(=value)?] [--max-queue-memory=value] [--dispatcher-threads=value]\n\
-\ \ \ \ [--order-policy=value] [--gateway-event-filter=value(,value)*]\n\
-\ \ \ \ [--gateway-event-substitution-filter=value] [--listener-param=value(,value)*]\n\
+\ \ \ \ [--disk-synchronous(=value)?] [--ignore-eviction-expiration(=value)?]\n\
+\ \ \ \ [--max-queue-memory=value] [--dispatcher-threads=value] [--order-policy=value]\n\
+\ \ \ \ [--gateway-event-filter=value(,value)*] [--gateway-event-substitution-filter=value]\n\
+\ \ \ \ [--listener-param=value(,value)*]\n\
PARAMETERS\n\
\ \ \ \ id\n\
\ \ \ \ \ \ \ \ ID of the queue to be created.\n\
@@ -582,6 +583,11 @@ PARAMETERS\n\
\ \ \ \ \ \ \ \ Required: false\n\
\ \ \ \ \ \ \ \ Default (if the parameter is specified without value): true\n\
\ \ \ \ \ \ \ \ Default (if the parameter is not specified): true\n\
+\ \ \ \ ignore-eviction-expiration\n\
+\ \ \ \ \ \ \ \ Whether to ignore eviction and expiration events.\n\
+\ \ \ \ \ \ \ \ Required: false\n\
+\ \ \ \ \ \ \ \ Default (if the parameter is specified without value): true\n\
+\ \ \ \ \ \ \ \ Default (if the parameter is not specified): true\n\
\ \ \ \ max-queue-memory\n\
\ \ \ \ \ \ \ \ Maximum amount of memory, in megabytes, that the queue can consume before overflowing to\n\
\ \ \ \ \ \ \ \ disk.\n\
[2/3] incubator-geode git commit: GEODE-1397: Fixing testOfflineHelp
Posted by je...@apache.org.
GEODE-1397: Fixing testOfflineHelp
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/cafda193
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/cafda193
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/cafda193
Branch: refs/heads/develop
Commit: cafda19311588efd43f56736aaab26a66365f58d
Parents: dd8ea42
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed May 18 14:29:43 2016 -0700
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Thu May 19 19:34:51 2016 -0700
----------------------------------------------------------------------
.../commands/HelpCommandsIntegrationTest.java | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cafda193/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
index 5d43a0e..2c048fc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
@@ -16,7 +16,9 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
+import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.management.internal.cli.CommandManager;
import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget;
@@ -27,8 +29,10 @@ import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
+import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Test;
+import org.junit.contrib.java.lang.system.ProvideSystemProperty;
import org.junit.experimental.categories.Category;
import java.util.Map;
@@ -39,12 +43,15 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@Category(IntegrationTest.class)
-public class HelpCommandsIntegrationTest extends JUnit4DistributedTestCase {
+public class HelpCommandsIntegrationTest {
private int jmxPort;
private Gfsh gfsh;
+ @ClassRule
+ public static final ProvideSystemProperty isGfsh = new ProvideSystemProperty("gfsh", "true");
+
@Before
public void setup() throws Exception {
jmxPort = AvailablePortHelper.getRandomAvailableTCPPort();
@@ -53,19 +60,20 @@ public class HelpCommandsIntegrationTest extends JUnit4DistributedTestCase {
localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
- getSystem(localProps);
+
+ new CacheFactory(localProps).create();
gfsh = Gfsh.getInstance(false, new String[0], new GfshConfig());
}
@After
public void teardown() {
- disconnectAllFromDS();
-
- gfsh.executeCommand("disconnect");
+ InternalDistributedSystem ids = InternalDistributedSystem.getConnectedInstance();
+ if (ids != null) {
+ ids.disconnect();
+ }
}
- @Ignore("Disconnect command doesn't appear to be working")
@Test
public void testOfflineHelp() throws Exception {
Properties helpProps = new Properties();
[3/3] incubator-geode git commit: GEODE-1397: Rename
HelpCommandsJUnitTest to ...IntegrationTest
Posted by je...@apache.org.
GEODE-1397: Rename HelpCommandsJUnitTest to ...IntegrationTest
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/dd8ea42a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/dd8ea42a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/dd8ea42a
Branch: refs/heads/develop
Commit: dd8ea42aa4fa00eda4f8812d8fdb108ceec3687a
Parents: 3a1c1a9
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed May 18 14:24:39 2016 -0700
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Thu May 19 19:34:51 2016 -0700
----------------------------------------------------------------------
.../commands/HelpCommandsIntegrationTest.java | 130 +++++++++++++++++++
.../cli/commands/HelpCommandsJUnitTest.java | 130 -------------------
2 files changed, 130 insertions(+), 130 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dd8ea42a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
new file mode 100644
index 0000000..5d43a0e
--- /dev/null
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.management.internal.cli.commands;
+
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.management.internal.cli.CommandManager;
+import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget;
+import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
+import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
+import com.gemstone.gemfire.management.internal.cli.shell.GfshConfig;
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.management.internal.cli.commands.CliCommandTestBase.commandResultToString;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+@Category(IntegrationTest.class)
+public class HelpCommandsIntegrationTest extends JUnit4DistributedTestCase {
+
+ private int jmxPort;
+
+ private Gfsh gfsh;
+
+ @Before
+ public void setup() throws Exception {
+ jmxPort = AvailablePortHelper.getRandomAvailableTCPPort();
+
+ Properties localProps = new Properties();
+ localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
+ localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
+ localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
+ getSystem(localProps);
+
+ gfsh = Gfsh.getInstance(false, new String[0], new GfshConfig());
+ }
+
+ @After
+ public void teardown() {
+ disconnectAllFromDS();
+
+ gfsh.executeCommand("disconnect");
+ }
+
+ @Ignore("Disconnect command doesn't appear to be working")
+ @Test
+ public void testOfflineHelp() throws Exception {
+ Properties helpProps = new Properties();
+ helpProps.load(HelpCommandsIntegrationTest.class.getResourceAsStream("golden-help-offline.properties"));
+
+ CommandManager cm = CommandManager.getInstance();
+ for (Map.Entry<String, CommandTarget> e : cm.getCommands().entrySet()) {
+ // Mock commands may have been produced in the VM by other tests
+ // 'quit' is an alias for 'exit' and doesn't produce help
+ if (e.getKey().contains("mock") || e.getKey().contains("quit")) {
+ continue;
+ }
+
+ CommandResult cr = (CommandResult) gfsh.executeCommand("help " + e.getKey()).getResult();
+ String gfshResult = commandResultToString(cr);
+
+ String goldParam = e.getKey().replace(" ", "-") + ".help";
+ String goldResult = helpProps.getProperty(goldParam);
+ assertNotNull("No golden text for: " + goldParam, goldResult);
+ assertEquals(goldResult.trim(), gfshResult.trim());
+
+ helpProps.remove(goldParam);
+ }
+
+ // No help should remain unchecked
+ assertEquals(0, helpProps.size());
+ }
+
+ @Test
+ public void testOnlineHelp() throws Exception {
+ Properties helpProps = new Properties();
+ helpProps.load(HelpCommandsIntegrationTest.class.getResourceAsStream("golden-help-online.properties"));
+
+ gfsh.executeCommand("connect --jmx-manager=localhost[" + jmxPort + "]");
+
+ CommandManager cm = CommandManager.getInstance();
+ for (Map.Entry<String, CommandTarget> e : cm.getCommands().entrySet()) {
+ // Mock commands may have been produced in the VM by other tests
+ // 'quit' is an alias for 'exit' and doesn't produce help
+ if (e.getKey().contains("mock") || e.getKey().contains("quit")) {
+ continue;
+ }
+
+ CommandResult cr = (CommandResult) gfsh.executeCommand("help " + e.getKey()).getResult();
+ String gfshResult = commandResultToString(cr);
+
+ String goldParam = e.getKey().replace(" ", "-") + ".help";
+ String goldResult = helpProps.getProperty(goldParam);
+ assertNotNull("No golden text for: " + goldParam, goldResult);
+
+ String[] lines = gfshResult.split("\n");
+ gfshResult = String.join("\n", lines[0], lines[1], lines[2], lines[3]);
+
+ assertEquals(goldResult.trim(), gfshResult.trim());
+
+ helpProps.remove(goldParam);
+ }
+
+ // No help should remain unchecked
+ assertEquals(0, helpProps.size());
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dd8ea42a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java
deleted file mode 100644
index 1d81d2e..0000000
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsJUnitTest.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.management.internal.cli.commands;
-
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.management.internal.cli.CommandManager;
-import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget;
-import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
-import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
-import com.gemstone.gemfire.management.internal.cli.shell.GfshConfig;
-import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.util.Map;
-import java.util.Properties;
-
-import static com.gemstone.gemfire.management.internal.cli.commands.CliCommandTestBase.commandResultToString;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-@Category(IntegrationTest.class)
-public class HelpCommandsJUnitTest extends JUnit4DistributedTestCase {
-
- private int jmxPort;
-
- private Gfsh gfsh;
-
- @Before
- public void setup() throws Exception {
- jmxPort = AvailablePortHelper.getRandomAvailableTCPPort();
-
- Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
- localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
- getSystem(localProps);
-
- gfsh = Gfsh.getInstance(false, new String[0], new GfshConfig());
- }
-
- @After
- public void teardown() {
- disconnectAllFromDS();
-
- gfsh.executeCommand("disconnect");
- }
-
- @Ignore("Disconnect command doesn't appear to be working")
- @Test
- public void testOfflineHelp() throws Exception {
- Properties helpProps = new Properties();
- helpProps.load(HelpCommandsJUnitTest.class.getResourceAsStream("golden-help-offline.properties"));
-
- CommandManager cm = CommandManager.getInstance();
- for (Map.Entry<String, CommandTarget> e : cm.getCommands().entrySet()) {
- // Mock commands may have been produced in the VM by other tests
- // 'quit' is an alias for 'exit' and doesn't produce help
- if (e.getKey().contains("mock") || e.getKey().contains("quit")) {
- continue;
- }
-
- CommandResult cr = (CommandResult) gfsh.executeCommand("help " + e.getKey()).getResult();
- String gfshResult = commandResultToString(cr);
-
- String goldParam = e.getKey().replace(" ", "-") + ".help";
- String goldResult = helpProps.getProperty(goldParam);
- assertNotNull("No golden text for: " + goldParam, goldResult);
- assertEquals(goldResult.trim(), gfshResult.trim());
-
- helpProps.remove(goldParam);
- }
-
- // No help should remain unchecked
- assertEquals(0, helpProps.size());
- }
-
- @Test
- public void testOnlineHelp() throws Exception {
- Properties helpProps = new Properties();
- helpProps.load(HelpCommandsJUnitTest.class.getResourceAsStream("golden-help-online.properties"));
-
- gfsh.executeCommand("connect --jmx-manager=localhost[" + jmxPort + "]");
-
- CommandManager cm = CommandManager.getInstance();
- for (Map.Entry<String, CommandTarget> e : cm.getCommands().entrySet()) {
- // Mock commands may have been produced in the VM by other tests
- // 'quit' is an alias for 'exit' and doesn't produce help
- if (e.getKey().contains("mock") || e.getKey().contains("quit")) {
- continue;
- }
-
- CommandResult cr = (CommandResult) gfsh.executeCommand("help " + e.getKey()).getResult();
- String gfshResult = commandResultToString(cr);
-
- String goldParam = e.getKey().replace(" ", "-") + ".help";
- String goldResult = helpProps.getProperty(goldParam);
- assertNotNull("No golden text for: " + goldParam, goldResult);
-
- String[] lines = gfshResult.split("\n");
- gfshResult = String.join("\n", lines[0], lines[1], lines[2], lines[3]);
-
- assertEquals(goldResult.trim(), gfshResult.trim());
-
- helpProps.remove(goldParam);
- }
-
- // No help should remain unchecked
- assertEquals(0, helpProps.size());
- }
-}