[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2018-11-20 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16693384#comment-16693384
 ] 

ASF subversion and git services commented on GEODE-4110:


Commit 222701ad7511841b1ba0033fc51c0ac6b044efe8 in geode's branch 
refs/heads/develop from jinmeiliao
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=222701a ]

GEODE-4110: improve junit ClientCacheRule (#2872)

* refactor some multiUser tests to use the ClientCacheRule
* add more convenience methods in ClientCacheRule
* clean up the ClusterStarterRule.startClient interface
* deprecate the SecurityTestUtils to favor using rules

> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>Assignee: Jinmei Liao
>Priority: Major
>  Labels: pull-request-available
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2018-01-02 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16308555#comment-16308555
 ] 

ASF subversion and git services commented on GEODE-4110:


Commit cf81ebc91726cb07d75dad12ff39648915407c15 in geode's branch 
refs/heads/feature/GEODE-4009 from [~jinmeiliao]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=cf81ebc ]

GEODE-4110: rename LocatorServerStartupRule to ClusterStartupRule (#1205)



> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>Assignee: Jinmei Liao
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2017-12-28 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16305811#comment-16305811
 ] 

ASF subversion and git services commented on GEODE-4110:


Commit cf81ebc91726cb07d75dad12ff39648915407c15 in geode's branch 
refs/heads/feature/GEODE-4131 from [~jinmeiliao]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=cf81ebc ]

GEODE-4110: rename LocatorServerStartupRule to ClusterStartupRule (#1205)



> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>Assignee: Jinmei Liao
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2017-12-28 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16305585#comment-16305585
 ] 

ASF subversion and git services commented on GEODE-4110:


Commit cf81ebc91726cb07d75dad12ff39648915407c15 in geode's branch 
refs/heads/develop from [~jinmeiliao]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=cf81ebc ]

GEODE-4110: rename LocatorServerStartupRule to ClusterStartupRule (#1205)



> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>Assignee: Jinmei Liao
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2017-12-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16304792#comment-16304792
 ] 

ASF GitHub Bot commented on GEODE-4110:
---

jinmeiliao commented on issue #1205: GEODE-4110: rename 
LocatorServerStartupRule to ClusterStartupRule
URL: https://github.com/apache/geode/pull/1205#issuecomment-354174671
 
 
   precheckin green


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>Assignee: Jinmei Liao
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2017-12-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16303981#comment-16303981
 ] 

ASF GitHub Bot commented on GEODE-4110:
---

jinmeiliao opened a new pull request #1205: GEODE-4110: rename 
LocatorServerStartupRule to ClusterStartupRule
URL: https://github.com/apache/geode/pull/1205
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>Assignee: Jinmei Liao
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2017-12-20 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16298767#comment-16298767
 ] 

ASF subversion and git services commented on GEODE-4110:


Commit ca62b211aa809ef4d86db754af2f83acdd68391b in geode's branch 
refs/heads/develop from [~jinmeiliao]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=ca62b21 ]

GEODE-4110: extend LocatorServerStartupRule to start a client VM. (#1175)

* created a new ClientCacheRule to create a client cache in current VM.
* have lcoatorserverStartupRule to use that rule to start up a client VM.

> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>Assignee: Jinmei Liao
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2017-12-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16298766#comment-16298766
 ] 

ASF GitHub Bot commented on GEODE-4110:
---

pdxrunner closed pull request #1175: GEODE-4110: extend 
LocatorServerStartupRule to start a client VM.
URL: https://github.com/apache/geode/pull/1175
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/geode-core/src/main/java/org/apache/geode/cache/client/ClientCacheFactory.java
 
b/geode-core/src/main/java/org/apache/geode/cache/client/ClientCacheFactory.java
index f6edc3ef9a..5666cf78c2 100644
--- 
a/geode-core/src/main/java/org/apache/geode/cache/client/ClientCacheFactory.java
+++ 
b/geode-core/src/main/java/org/apache/geode/cache/client/ClientCacheFactory.java
@@ -14,7 +14,8 @@
  */
 package org.apache.geode.cache.client;
 
-import static org.apache.geode.distributed.ConfigurationProperties.*;
+import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS;
+import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT;
 
 import java.util.Properties;
 
diff --git 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandDUnitTest.java
 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandDUnitTest.java
index 42065979f7..5262e796ef 100644
--- 
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandDUnitTest.java
+++ 
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateDefinedIndexesCommandDUnitTest.java
@@ -36,6 +36,7 @@
 import org.apache.geode.test.dunit.rules.MemberVM;
 import org.apache.geode.test.junit.categories.DistributedTest;
 import org.apache.geode.test.junit.rules.GfshCommandRule;
+import org.apache.geode.test.junit.rules.VMProvider;
 import org.apache.geode.test.junit.rules.serializable.SerializableTestName;
 
 @Category(DistributedTest.class)
@@ -78,7 +79,7 @@ public void noDefinitions() {
   public void nonexistentRegion() {
 String regionName = testName.getMethodName();
 
-MemberVM.invokeInEveryMember(() -> {
+VMProvider.invokeInEveryMember(() -> {
   Cache cache = LocatorServerStartupRule.getCache();
   assertThat(cache.getRegion(regionName)).isNull();
 }, server1, server2, server3);
@@ -90,7 +91,7 @@ public void nonexistentRegion() {
 gfsh.executeAndAssertThat("create defined indexes").statusIsError()
 .containsOutput("RegionNotFoundException");
 
-MemberVM.invokeInEveryMember(() -> {
+VMProvider.invokeInEveryMember(() -> {
   Cache cache = LocatorServerStartupRule.getCache();
   QueryService queryService = cache.getQueryService();
 
@@ -115,7 +116,7 @@ public void multipleIndexesOnMultipleRegionsClusterWide() {
 .containsOutput("Region \"/" + region2Name + "\" created on 
\"server-2\"")
 .containsOutput("Region \"/" + region2Name + "\" created on 
\"server-3\"");
 
-MemberVM.invokeInEveryMember(() -> {
+VMProvider.invokeInEveryMember(() -> {
   Cache cache = LocatorServerStartupRule.getCache();
   assertThat(cache.getRegion(region1Name)).isNotNull();
   assertThat(cache.getRegion(region2Name)).isNotNull();
@@ -132,7 +133,7 @@ public void multipleIndexesOnMultipleRegionsClusterWide() {
 gfsh.executeAndAssertThat("create defined indexes").statusIsSuccess()
 .containsOutput("Indexes successfully created");
 
-MemberVM.invokeInEveryMember(() -> {
+VMProvider.invokeInEveryMember(() -> {
   Cache cache = LocatorServerStartupRule.getCache();
   QueryService queryService = cache.getQueryService();
   Region region1 = cache.getRegion(region1Name);
@@ -171,13 +172,13 @@ public void 
multipleIndexesOnMultipleRegionsInMemberGroup() {
 .statusIsSuccess()
 .containsOutput("Region \"/" + region2Name + "\" created on 
\"server-3\"");
 
-MemberVM.invokeInEveryMember(() -> {
+VMProvider.invokeInEveryMember(() -> {
   Cache cache = LocatorServerStartupRule.getCache();
   assertThat(cache.getRegion(region1Name)).isNull();
   assertThat(cache.getRegion(region2Name)).isNull();
 }, server1, server2);
 
-MemberVM.invokeInEveryMember(() -> {
+VMProvider.invokeInEveryMember(() -> {
   Cache cache = LocatorServerStartupRule.getCache();
   assertThat(cache.getRegion(region1Name)).isNotNull();
   assertThat(cache.getRegion(region2Name)).isNotNull();
@@ -194,7 +195,7 @@ public void multipleIndexesOnMultipleRegionsInMemberGroup() 
{
 gfsh.executeAndAssertThat("create defined indexes 
--group=group1").statusIsSuccess()
 .containsOutput

[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2017-12-20 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16298700#comment-16298700
 ] 

ASF GitHub Bot commented on GEODE-4110:
---

pdxrunner commented on issue #1175: GEODE-4110: extend LocatorServerStartupRule 
to start a client VM.
URL: https://github.com/apache/geode/pull/1175#issuecomment-353111904
 
 
   +1 to renaming LocatorServerStartupRule to ClusterStartupRule. Let's do it 
as a separate commit since it's going to touch a lot of files.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>Assignee: Jinmei Liao
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2017-12-18 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16295258#comment-16295258
 ] 

ASF GitHub Bot commented on GEODE-4110:
---

jdeppe-pivotal commented on a change in pull request #1175: GEODE-4110: extend 
LocatorServerStartupRule to start a client VM.
URL: https://github.com/apache/geode/pull/1175#discussion_r157542250
 
 

 ##
 File path: 
geode-core/src/test/java/org/apache/geode/test/dunit/rules/LocatorServerStartupRule.java
 ##
 @@ -308,30 +278,68 @@ public MemberVM startServerAsEmbededLocator(int index, 
Properties properties) th
   serverStarter.before();
   return serverStarter;
 });
-return setMember(index, new MemberVM(server, serverVM, 
useTempWorkingDir()));
+
+MemberVM memberVM = new MemberVM(server, serverVM, useTempWorkingDir());
+occupiedVMs.put(index, memberVM);
+return memberVM;
   }
 
   public void stopVM(int index) {
 stopVM(index, true);
   }
 
   public void stopVM(int index, boolean cleanWorkingDir) {
-MemberVM member = members.get(index);
-// user has started a server/locator in this VM
-if (member != null) {
-  member.stopMember(cleanWorkingDir);
-}
-// user may have used this VM as a client VM
-else {
-  getVM(index).invoke(() -> MemberStarterRule.disconnectDSIfAny());
+VMProvider member = occupiedVMs.get(index);
+
+if (member == null)
+  return;
+
+member.stopVM(cleanWorkingDir);
+  }
+
+  public ClientVM startClientVM(int index, String username, String password,
 
 Review comment:
   I don't really like this signature but I guess the only way around would be 
with a `withServerPort` style of builder. For now it's OK though until we get 
more usage patterns for client VMs.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>Assignee: Jinmei Liao
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2017-12-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16294551#comment-16294551
 ] 

ASF GitHub Bot commented on GEODE-4110:
---

jinmeiliao commented on issue #1175: GEODE-4110: extend 
LocatorServerStartupRule to start a client VM.
URL: https://github.com/apache/geode/pull/1175#issuecomment-352336360
 
 
   should consider renaming the class to ClusterStartupRule


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>Assignee: Jinmei Liao
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GEODE-4110) Extend LocatorServerStartupRule to be able to start a client VM

2017-12-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/GEODE-4110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16293393#comment-16293393
 ] 

ASF GitHub Bot commented on GEODE-4110:
---

jinmeiliao opened a new pull request #1175: GEODE-4110: extend 
LocatorServerStartupRule to start a client VM.
URL: https://github.com/apache/geode/pull/1175
 
 
   * created a new ClientCacheRule to create a client cache in current VM.
   * have lcoatorserverStartupRule to use that rule to start up a client VM.
   
   Thank you for submitting a contribution to Apache Geode.
   
   In order to streamline the review of the contribution we ask you
   to ensure the following steps have been taken:
   
   ### For all changes:
   - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in 
the commit message?
   
   - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically `develop`)?
   
   - [ ] Is your initial contribution a single, squashed commit?
   
   - [ ] Does `gradlew build` run cleanly?
   
   - [ ] Have you written or updated unit tests to verify your changes?
   
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### Note:
   Please ensure that once the PR is submitted, you check travis-ci for build 
issues and
   submit an update to your PR as soon as possible. If you need help, please 
send an
   email to d...@geode.apache.org.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Extend LocatorServerStartupRule to be able to start a client VM
> ---
>
> Key: GEODE-4110
> URL: https://issues.apache.org/jira/browse/GEODE-4110
> Project: Geode
>  Issue Type: Improvement
>  Components: management
>Reporter: Jinmei Liao
>
> Now locatorServerStartupRule has startLocatorVM and has startServerVM, 
> sometimes we found ourselves in need of a startClientVM method as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)