You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2018/03/20 19:21:59 UTC
[geode] 02/03: GEODE-4885: Fix ClientCQAuthDUnitTest by invoking
getVM during setUp
This is an automated email from the ASF dual-hosted git repository.
klund pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
commit f39342d4a52f900abd072b14e20bfcde05c25b77
Author: Kirk Lund <kl...@apache.org>
AuthorDate: Mon Mar 19 13:13:34 2018 -0700
GEODE-4885: Fix ClientCQAuthDUnitTest by invoking getVM during setUp
Fix ClientCQAuthDUnitTest usage of getVM so its invoked after
ClusterStartupRule launches DUnit
---
.../apache/geode/security/ClientCQAuthDUnitTest.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/geode-cq/src/test/java/org/apache/geode/security/ClientCQAuthDUnitTest.java b/geode-cq/src/test/java/org/apache/geode/security/ClientCQAuthDUnitTest.java
index 0b87c49..8041b81 100644
--- a/geode-cq/src/test/java/org/apache/geode/security/ClientCQAuthDUnitTest.java
+++ b/geode-cq/src/test/java/org/apache/geode/security/ClientCQAuthDUnitTest.java
@@ -12,7 +12,6 @@
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
-
package org.apache.geode.security;
import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANAGER;
@@ -20,6 +19,7 @@ import static org.apache.geode.security.SecurityTestUtil.assertNotAuthorized;
import static org.apache.geode.security.SecurityTestUtil.createClientCache;
import static org.apache.geode.security.SecurityTestUtil.createProxyRegion;
+import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -42,18 +42,27 @@ import org.apache.geode.test.junit.rules.ServerStarterRule;
@Category({DistributedTest.class, SecurityTest.class})
public class ClientCQAuthDUnitTest {
+ private static final String REGION_NAME = "AuthRegion";
+
+ private VM client1;
+ private VM client2;
+ private VM client3;
+
@Rule
public ClusterStartupRule startupRule = new ClusterStartupRule();
- private static String REGION_NAME = "AuthRegion";
- private final VM client1 = startupRule.getVM(1);
- private final VM client2 = startupRule.getVM(2);
- private final VM client3 = startupRule.getVM(3);
@Rule
public ServerStarterRule server = new ServerStarterRule()
.withProperty(SECURITY_MANAGER, SimpleTestSecurityManager.class.getName())
.withRegion(RegionShortcut.REPLICATE, REGION_NAME);
+ @Before
+ public void setUp() {
+ client1 = startupRule.getVM(1);
+ client2 = startupRule.getVM(2);
+ client3 = startupRule.getVM(3);
+ }
+
@Test
public void verifyCQPermissions() {
String query = "select * from /AuthRegion";
--
To stop receiving notification emails like this one, please contact
klund@apache.org.