You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/05/27 10:54:32 UTC

[GitHub] [ignite] dgarus commented on a change in pull request #7677: IGNITE-12343 Remote filter and transformer of ContinuousQueries have to run inside the Ignite Sandbox

dgarus commented on a change in pull request #7677:
URL: https://github.com/apache/ignite/pull/7677#discussion_r431030094



##########
File path: modules/core/src/test/java/org/apache/ignite/internal/processors/security/sandbox/AbstractContinuousQuerySandboxTest.java
##########
@@ -0,0 +1,132 @@
+/*
+ * 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.ignite.internal.processors.security.sandbox;
+
+import java.security.AccessControlException;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.function.Supplier;
+import javax.cache.Cache;
+import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.query.Query;
+import org.apache.ignite.cache.query.QueryCursor;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.internal.IgniteEx;
+import org.apache.ignite.lang.IgniteBiPredicate;
+import org.apache.ignite.testframework.GridTestUtils;
+
+/**
+ * Abstract class to test that a remote filter and transformer of ContinuousQueries run on a remote node inside the
+ * Ignite Sandbox.
+ */
+public class AbstractContinuousQuerySandboxTest extends AbstractSandboxTest {
+    /** Cache name for tests. */
+    protected static final String CACHE_NAME = "TEST_CACHE";
+
+    /** Cache index. */
+    private static final AtomicInteger CACHE_INDEX = new AtomicInteger();
+
+    /** Error. */
+    private static volatile AccessControlException error;
+
+    /** Runs control action for CQ tests. */
+    protected static final Runnable CONTROL_ACTION_RUNNER = new Runnable() {
+        @Override public void run() {
+            try {
+                controlAction();
+            }
+            catch (AccessControlException e) {
+                error = e;

Review comment:
       Ok




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org