You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by la...@apache.org on 2018/03/28 17:04:42 UTC

[geode] branch feature/GEODE-4909 updated (798040d -> 8f19c8a)

This is an automated email from the ASF dual-hosted git repository.

ladyvader pushed a change to branch feature/GEODE-4909
in repository https://gitbox.apache.org/repos/asf/geode.git.


 discard 798040d  GEODE-4909: Additional lucene reindex tests with security
     add f141019  Feature/geode 4782 (#1682)
     add 4cd33db  Revert "GEODE-4822 The second server instance startup error: Could not create an instance of PartitionRegionConfig"
     add 6f025bc  Revert "GEODE-4822 The second server instance startup error: Could not create an instance of PartitionRegionConfig"
     new 8f19c8a  GEODE-4909: Additional lucene reindex tests with security

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (798040d)
            \
             N -- N -- N   refs/heads/feature/GEODE-4909 (8f19c8a)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/java/org/apache/geode/DataSerializer.java |  12 +-
 .../apache/geode/cache/query/internal/CqEntry.java |   3 +-
 .../internal/CumulativeNonDistinctResults.java     |   3 +-
 .../cache/query/internal/LinkedResultSet.java      |  10 +-
 .../cache/query/internal/LinkedStructSet.java      |  12 +-
 .../cache/query/internal/NWayMergeResults.java     |   3 +-
 .../geode/cache/query/internal/ResultsBag.java     |   3 +-
 .../query/internal/ResultsCollectionWrapper.java   |  12 +-
 .../geode/cache/query/internal/ResultsSet.java     |   8 +-
 .../cache/query/internal/SortedResultSet.java      |  10 +-
 .../cache/query/internal/SortedStructSet.java      |  36 +---
 .../geode/cache/query/internal/StructImpl.java     |   5 +-
 .../geode/cache/query/internal/StructSet.java      |  26 +--
 .../org/apache/geode/internal/DSFIDFactory.java    | 126 ++++++-----
 .../geode/internal/InternalDataSerializer.java     | 117 +++--------
 .../internal/admin/remote/DestroyEntryMessage.java |   3 +-
 .../internal/admin/remote/RemoteEntrySnapshot.java |   5 +-
 .../admin/remote/RemoteRegionSnapshot.java         |   3 +-
 .../geode/internal/cache/AbstractRegionMap.java    |   2 +-
 .../geode/internal/cache/DestroyOperation.java     |   3 +-
 .../cache/DestroyPartitionedRegionMessage.java     |   3 +-
 .../internal/cache/DistributedCacheOperation.java  |   2 +-
 .../internal/cache/DistributedPutAllOperation.java |   4 +-
 .../DistributedRegionFunctionStreamingMessage.java |   3 +-
 .../cache/DistributedRemoveAllOperation.java       |   2 +-
 .../geode/internal/cache/EntryEventImpl.java       |  10 +-
 .../cache/FunctionStreamingReplyMessage.java       |   3 +-
 .../geode/internal/cache/GemFireCacheImpl.java     |   5 +-
 .../internal/cache/InitialImageOperation.java      |   2 +-
 .../geode/internal/cache/InvalidateOperation.java  |   3 +-
 .../cache/InvalidatePartitionedRegionMessage.java  |   3 +-
 .../cache/LatestLastAccessTimeMessage.java         |   3 +-
 .../apache/geode/internal/cache/LocalRegion.java   |   5 +-
 .../geode/internal/cache/NonLocalRegionEntry.java  |   5 +-
 .../geode/internal/cache/QueuedOperation.java      |   5 +-
 .../cache/SearchLoadAndWriteProcessor.java         |  14 +-
 .../geode/internal/cache/TXCommitMessage.java      |  11 +-
 .../internal/cache/TXRegionLockRequestImpl.java    |   2 +-
 .../cache/UpdateEntryVersionOperation.java         |   3 +-
 .../geode/internal/cache/UpdateOperation.java      |   2 +-
 .../internal/cache/WrappedCallbackArgument.java    |   3 +-
 .../cache/execute/FunctionRemoteContext.java       |   3 +-
 .../cache/partitioned/ContainsKeyValueMessage.java |   3 +-
 .../internal/cache/partitioned/DestroyMessage.java |   4 +-
 .../DestroyRegionOnDataStoreMessage.java           |   3 +-
 .../cache/partitioned/FetchBulkEntriesMessage.java |  14 +-
 .../cache/partitioned/FetchEntryMessage.java       |   2 +-
 .../cache/partitioned/FetchKeysMessage.java        |  21 +-
 .../internal/cache/partitioned/GetMessage.java     |   7 +-
 .../cache/partitioned/PRTombstoneMessage.java      |   3 +-
 .../partitioned/PRUpdateEntryVersionMessage.java   |   3 +-
 .../cache/partitioned/PutAllPRMessage.java         |   2 +-
 .../internal/cache/partitioned/PutMessage.java     |   6 +-
 .../internal/cache/partitioned/QueryMessage.java   |   5 +-
 .../cache/partitioned/RemoveAllPRMessage.java      |   2 +-
 .../tier/sockets/ClientInterestMessageImpl.java    |   7 +-
 .../tier/sockets/ClientUpdateMessageImpl.java      |   2 +-
 .../cache/tier/sockets/ObjectPartList.java         |   5 +-
 .../cache/tier/sockets/ObjectPartList651.java      |   5 +-
 .../cache/tier/sockets/VersionedObjectList.java    |   4 +-
 .../geode/internal/cache/tx/DistTxEntryEvent.java  |   4 +-
 .../cache/tx/RemoteContainsKeyValueMessage.java    |   3 +-
 .../internal/cache/tx/RemoteDestroyMessage.java    |   6 +-
 .../internal/cache/tx/RemoteFetchEntryMessage.java |   2 +-
 .../internal/cache/tx/RemoteFetchKeysMessage.java  |  22 +-
 .../cache/tx/RemoteFetchVersionMessage.java        |   3 +-
 .../geode/internal/cache/tx/RemoteGetMessage.java  |   7 +-
 .../geode/internal/cache/tx/RemotePutMessage.java  |   8 +-
 .../internal/cache/wan/GatewaySenderEventImpl.java |   5 +-
 ...aySenderQueueEntrySynchronizationOperation.java |   3 +-
 .../cache/wan/serial/BatchDestroyOperation.java    |   3 +-
 .../org/apache/geode/internal/util/BlobHelper.java |  16 --
 .../internal/cli/functions/CliFunctionResult.java  |  10 +-
 .../apache/geode/pdx/internal/PdxInstanceImpl.java |  21 +-
 .../apache/geode/pdx/internal/TypeRegistry.java    |  42 +---
 .../geode/codeAnalysis/ClassAndMethodDetails.java  |   6 +-
 ...alDataSerializerSerializationWhitelistTest.java |   2 -
 .../cache/EntryEventSerializationTest.java         |   3 -
 .../internal/cache/PartitionRegionConfigTest.java  |   2 -
 .../QueryDataFunctionIntegrationTest.java          |   3 +-
 .../cli/commands/AlterRegionCommandDUnitTest.java  |   3 +-
 .../AlterRegionCommandIntegrationTest.java         |   3 +-
 .../ConfigurePDXCommandIntegrationTest.java        |   3 +-
 .../cli/commands/ConnectCommandDUnitTest.java      |   3 +-
 .../CreateAlterDestroyRegionCommandsDUnitTest.java |   4 +-
 .../CreateAsyncEventQueueCommandDUnitTest.java     |   3 +-
 .../CreateDefinedIndexesCommandDUnitTest.java      |   3 +-
 .../CreateJndiBindingCommandDUnitTest.java         |   3 +-
 .../cli/commands/CreateRegionCommandDUnitTest.java |   3 +-
 .../CreateRegionCommandIntegrationTest.java        |   3 +-
 ...DeployCommandFunctionRegistrationDUnitTest.java |   3 +-
 .../DescribeConfigCommandIntegrationTest.java      |   3 +-
 .../DescribeConnectionCommandIntegrationTest.java  |   3 +-
 .../commands/DescribeMembersCommandDUnitTest.java  |   3 +-
 .../DestroyAsyncEventQueueCommandDUnitTest.java    |   3 +-
 .../commands/DestroyIndexCommandsDUnitTest.java    |   3 +-
 .../DestroyJndiBindingCommandDUnitTest.java        |   3 +-
 .../commands/DestroyRegionCommandDUnitTest.java    |   3 +-
 .../cli/commands/DiskStoreCommandsDUnitTest.java   |   3 +-
 .../ExecuteFunctionCommandSecurityTest.java        |   4 +-
 .../commands/ExportStackTraceCommandDUnitTest.java |   3 +-
 .../cli/commands/FunctionCommandsDUnitTest.java    |   3 +-
 .../internal/cli/commands/GcCommandDUnitTest.java  |   3 +-
 .../cli/commands/GemfireDataCommandsDUnitTest.java |   9 +-
 .../cli/commands/GetCommandIntegrationTest.java    |   3 +-
 .../cli/commands/GfshCommandIntegrationTest.java   |   3 +-
 .../cli/commands/IndexCommandsIntegrationTest.java |   3 +-
 .../IndexCommandsShareConfigurationDUnitTest.java  |   3 +-
 .../ListDiskStoreCommandIntegrationTest.java       |   3 +-
 .../cli/commands/ListIndexCommandDUnitTest.java    |   3 +-
 .../commands/ListJndiBindingCommandDUnitTest.java  |   3 +-
 .../cli/commands/PutCommandIntegrationTest.java    |   3 +-
 .../cli/commands/QueryCommandIntegrationTest.java  |   3 +-
 .../cli/commands/RemoveCommandDUnitTest.java       |   3 +-
 .../cli/commands/ShellCommandsDUnitTest.java       |   3 +-
 .../ShowMetricsCommandIntegrationTest.java         |   3 +-
 .../cli/commands/VersionCommandJUnitTest.java      |   3 +-
 .../functions/CreateJndiBindingFunctionTest.java   |   3 +-
 .../functions/DataCommandFunctionJUnitTest.java    |   3 +-
 .../DataCommandFunctionWithPDXJUnitTest.java       |   3 +-
 .../functions/DestroyJndiBindingFunctionTest.java  |   3 +-
 .../ExportLogsFunctionIntegrationTest.java         |   3 +-
 .../cli/functions/ListJndiBindingFunctionTest.java |   3 +-
 .../functions/SizeExportLogsFunctionFileTest.java  |   3 +-
 .../cli/functions/SizeExportLogsFunctionTest.java  |   3 +-
 .../cli/shell/GfshMultilineCommandTest.java        |   3 +-
 .../internal/deployment/FunctionScannerTest.java   |   3 +-
 .../geode/pdx/AutoSerializableJUnitTest.java       |   7 +-
 .../apache/geode/pdx/PdxSerializerJUnitTest.java   | 138 ------------
 .../geode/pdx/PdxSerializerRegressionTest.java     | 106 ----------
 .../apache/geode/test/junit/rules/VMProvider.java  |   4 -
 .../codeAnalysis/sanctionedDataSerializables.txt   | 233 +++++++++++----------
 .../lucene/internal/LuceneResultStructImpl.java    |   5 +-
 .../lucene/internal/distributed/EntryScore.java    |   3 +-
 .../cache/lucene/internal/results/PageEntry.java   |   5 +-
 135 files changed, 511 insertions(+), 906 deletions(-)
 delete mode 100644 geode-core/src/test/java/org/apache/geode/pdx/PdxSerializerJUnitTest.java
 delete mode 100644 geode-core/src/test/java/org/apache/geode/pdx/PdxSerializerRegressionTest.java

-- 
To stop receiving notification emails like this one, please contact
ladyvader@apache.org.

[geode] 01/01: GEODE-4909: Additional lucene reindex tests with security

Posted by la...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ladyvader pushed a commit to branch feature/GEODE-4909
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 8f19c8a095ff566a421f09e3e62d73df35ea6f3b
Author: Lynn Hughes-Godfrey <lh...@pivotal.io>
AuthorDate: Tue Mar 27 15:23:07 2018 -0700

    GEODE-4909: Additional lucene reindex tests with security
    
    * Extended existing tests with and without gfsh to create region prior to creating lucene index.
---
 .../lucene/LuceneClientSecurityDUnitTest.java      | 19 +++--
 ...urityWithRegionCreatedBeforeIndexDUnitTest.java | 64 +++++++++++++++++
 .../lucene/LuceneCommandsSecurityDUnitTest.java    |  8 +--
 ...urityWithRegionCreatedBeforeIndexDUnitTest.java | 84 ++++++++++++++++++++++
 4 files changed, 161 insertions(+), 14 deletions(-)

diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneClientSecurityDUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneClientSecurityDUnitTest.java
index 0ae60a9..06cf7c1 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneClientSecurityDUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneClientSecurityDUnitTest.java
@@ -21,8 +21,6 @@ import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANA
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.util.List;
@@ -31,7 +29,6 @@ import java.util.concurrent.TimeUnit;
 
 import junitparams.JUnitParamsRunner;
 import junitparams.Parameters;
-import org.assertj.core.api.Assertions;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
@@ -43,7 +40,6 @@ import org.apache.geode.cache.client.ClientCache;
 import org.apache.geode.cache.client.ClientCacheFactory;
 import org.apache.geode.cache.client.ClientRegionShortcut;
 import org.apache.geode.cache.client.ServerOperationException;
-import org.apache.geode.cache.lucene.test.TestObject;
 import org.apache.geode.cache.server.CacheServer;
 import org.apache.geode.distributed.ConfigurationProperties;
 import org.apache.geode.security.NotAuthorizedException;
@@ -63,6 +59,7 @@ public class LuceneClientSecurityDUnitTest extends LuceneQueriesAccessorBase {
       LuceneCommandsSecurityDUnitTest.UserNameAndExpectedResponse user) {
     // Start server
     int serverPort = dataStore1.invoke(() -> startCacheServer());
+    dataStore1.invoke(() -> createRegionIndexAndData());
 
     // Start client
     accessor.invoke(() -> startClient(user.getUserName(), serverPort));
@@ -72,6 +69,14 @@ public class LuceneClientSecurityDUnitTest extends LuceneQueriesAccessorBase {
         () -> executeTextSearch(user.getExpectAuthorizationError(), user.getExpectedResponse()));
   }
 
+  protected void createRegionIndexAndData() {
+    Cache cache = getCache();
+    LuceneService luceneService = LuceneServiceProvider.get(cache);
+    luceneService.createIndexFactory().addField("field1").create(INDEX_NAME, REGION_NAME);
+    Region region = cache.createRegionFactory(RegionShortcut.PARTITION).create(REGION_NAME);
+    region.put("key", new org.apache.geode.cache.lucene.test.TestObject("hello", "world"));
+  }
+
   private int startCacheServer() throws IOException {
     Properties props = new Properties();
     props.put(ConfigurationProperties.SERIALIZABLE_OBJECT_FILTER,
@@ -81,12 +86,6 @@ public class LuceneClientSecurityDUnitTest extends LuceneQueriesAccessorBase {
     final CacheServer server = cache.addCacheServer();
     server.setPort(0);
     server.start();
-    LuceneService luceneService = LuceneServiceProvider.get(cache);
-    luceneService.createIndexFactory().addField("field1").create(INDEX_NAME, REGION_NAME);
-    Region region = cache.createRegionFactory(RegionShortcut.PARTITION).create(REGION_NAME);
-
-    region.put("key", new org.apache.geode.cache.lucene.test.TestObject("hello", "world"));
-
     return server.getPort();
   }
 
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneClientSecurityWithRegionCreatedBeforeIndexDUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneClientSecurityWithRegionCreatedBeforeIndexDUnitTest.java
new file mode 100644
index 0000000..7afcb36
--- /dev/null
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneClientSecurityWithRegionCreatedBeforeIndexDUnitTest.java
@@ -0,0 +1,64 @@
+/*
+ * 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 org.apache.geode.cache.lucene;
+
+import static org.apache.geode.cache.lucene.test.LuceneTestUtilities.INDEX_NAME;
+import static org.apache.geode.cache.lucene.test.LuceneTestUtilities.REGION_NAME;
+
+import junitparams.JUnitParamsRunner;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+
+import org.apache.geode.cache.Cache;
+import org.apache.geode.cache.Region;
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache.lucene.internal.LuceneIndexFactoryImpl;
+import org.apache.geode.cache.lucene.internal.LuceneServiceImpl;
+import org.apache.geode.test.junit.categories.DistributedTest;
+import org.apache.geode.test.junit.categories.SecurityTest;
+
+@Category({DistributedTest.class, SecurityTest.class})
+@RunWith(JUnitParamsRunner.class)
+public class LuceneClientSecurityWithRegionCreatedBeforeIndexDUnitTest
+    extends LuceneClientSecurityDUnitTest {
+
+  @Before
+  public void setLuceneReindexFlag() {
+    dataStore1.invoke(() -> LuceneServiceImpl.LUCENE_REINDEX = true);
+    dataStore2.invoke(() -> LuceneServiceImpl.LUCENE_REINDEX = true);
+    accessor.invoke(() -> LuceneServiceImpl.LUCENE_REINDEX = true);
+  }
+
+  @After
+  public void clearLuceneReindexFlag() {
+    dataStore1.invoke(() -> LuceneServiceImpl.LUCENE_REINDEX = false);
+    dataStore2.invoke(() -> LuceneServiceImpl.LUCENE_REINDEX = false);
+    accessor.invoke(() -> LuceneServiceImpl.LUCENE_REINDEX = false);
+  }
+
+  @Override
+  protected void createRegionIndexAndData() {
+    Cache cache = getCache();
+    Region region = cache.createRegionFactory(RegionShortcut.PARTITION).create(REGION_NAME);
+
+    region.put("key", new org.apache.geode.cache.lucene.test.TestObject("hello", "world"));
+
+    LuceneService luceneService = LuceneServiceProvider.get(cache);
+    ((LuceneIndexFactoryImpl) luceneService.createIndexFactory()).addField("field1")
+        .create(INDEX_NAME, REGION_NAME, LuceneServiceImpl.LUCENE_REINDEX);
+  }
+}
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneCommandsSecurityDUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneCommandsSecurityDUnitTest.java
index be99c15..01258bc 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneCommandsSecurityDUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneCommandsSecurityDUnitTest.java
@@ -57,7 +57,7 @@ public class LuceneCommandsSecurityDUnitTest {
   @Rule
   public GfshCommandRule gfshShell = new GfshCommandRule();
 
-  private MemberVM locator;
+  protected MemberVM locator;
 
   @Before
   public void before() throws Exception {
@@ -192,7 +192,7 @@ public class LuceneCommandsSecurityDUnitTest {
     verifyResult(user, result);
   }
 
-  private void createIndexAndRegion() throws Exception {
+  protected void createIndexAndRegion() throws Exception {
     // Connect gfsh to locator with permissions necessary to create an index and region
     this.gfshShell.secureConnectAndVerify(this.locator.getPort(), GfshCommandRule.PortType.locator,
         "cluster,data", "cluster,data");
@@ -218,7 +218,7 @@ public class LuceneCommandsSecurityDUnitTest {
     assertTrue(this.gfshShell.getGfshOutput().contains(user.getExpectedResponse()));
   }
 
-  private String getCreateIndexCommand() {
+  protected String getCreateIndexCommand() {
     CommandStringBuilder csb = new CommandStringBuilder(LuceneCliStrings.LUCENE_CREATE_INDEX);
     csb.addOption(LuceneCliStrings.LUCENE__INDEX_NAME, INDEX_NAME);
     csb.addOption(LuceneCliStrings.LUCENE__REGION_PATH, REGION_NAME);
@@ -226,7 +226,7 @@ public class LuceneCommandsSecurityDUnitTest {
     return csb.toString();
   }
 
-  private String getCreateRegionCommand() {
+  protected String getCreateRegionCommand() {
     CommandStringBuilder csb = new CommandStringBuilder(CliStrings.CREATE_REGION);
     csb.addOption(CliStrings.CREATE_REGION__REGION, REGION_NAME);
     csb.addOption(CliStrings.CREATE_REGION__REGIONSHORTCUT,
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneCommandsSecurityWithRegionCreatedBeforeIndexDUnitTest.java b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneCommandsSecurityWithRegionCreatedBeforeIndexDUnitTest.java
new file mode 100644
index 0000000..cf285a8
--- /dev/null
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneCommandsSecurityWithRegionCreatedBeforeIndexDUnitTest.java
@@ -0,0 +1,84 @@
+/*
+ * 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 org.apache.geode.cache.lucene;
+
+import static org.apache.geode.cache.lucene.test.LuceneTestUtilities.INDEX_NAME;
+import static org.apache.geode.cache.lucene.test.LuceneTestUtilities.REGION_NAME;
+import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANAGER;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.Serializable;
+import java.util.Properties;
+
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+
+import org.apache.geode.cache.RegionShortcut;
+import org.apache.geode.cache.lucene.internal.LuceneServiceImpl;
+import org.apache.geode.cache.lucene.internal.cli.LuceneCliStrings;
+import org.apache.geode.management.cli.Result;
+import org.apache.geode.management.internal.cli.i18n.CliStrings;
+import org.apache.geode.management.internal.cli.result.CommandResult;
+import org.apache.geode.management.internal.cli.result.ErrorResultData;
+import org.apache.geode.management.internal.cli.result.ResultBuilder;
+import org.apache.geode.management.internal.cli.util.CommandStringBuilder;
+import org.apache.geode.security.SimpleTestSecurityManager;
+import org.apache.geode.test.dunit.rules.ClusterStartupRule;
+import org.apache.geode.test.dunit.rules.MemberVM;
+import org.apache.geode.test.junit.categories.DistributedTest;
+import org.apache.geode.test.junit.categories.LuceneTest;
+import org.apache.geode.test.junit.categories.SecurityTest;
+import org.apache.geode.test.junit.rules.GfshCommandRule;
+
+@Category({DistributedTest.class, SecurityTest.class, LuceneTest.class})
+@RunWith(JUnitParamsRunner.class)
+public class LuceneCommandsSecurityWithRegionCreatedBeforeIndexDUnitTest
+    extends LuceneCommandsSecurityDUnitTest {
+
+  @Before
+  public void setLuceneReindexFlag() {
+    MemberVM server = this.locatorServer.getMember(1);
+    server.invoke(() -> LuceneServiceImpl.LUCENE_REINDEX = true);
+  }
+
+  @After
+  public void clearLuceneReindexFlag() {
+    MemberVM server = this.locatorServer.getMember(1);
+    server.invoke(() -> LuceneServiceImpl.LUCENE_REINDEX = false);
+  }
+
+  @Override
+  protected void createIndexAndRegion() throws Exception {
+    // Connect gfsh to locator with permissions necessary to create an index and region
+    this.gfshShell.secureConnectAndVerify(this.locator.getPort(), GfshCommandRule.PortType.locator,
+        "cluster,data", "cluster,data");
+
+    // Create region
+    this.gfshShell.executeAndAssertThat(getCreateRegionCommand()).statusIsSuccess();
+
+    // Create lucene index
+    this.gfshShell.executeAndAssertThat(getCreateIndexCommand()).statusIsSuccess();
+
+    // Disconnect gfsh
+    this.gfshShell.disconnect();
+  }
+}

-- 
To stop receiving notification emails like this one, please contact
ladyvader@apache.org.