You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/10/22 20:21:45 UTC
[GitHub] [geode] kirklund commented on a change in pull request #7025: Add unit tests for PartitionedRegion virtualPut
kirklund commented on a change in pull request #7025:
URL: https://github.com/apache/geode/pull/7025#discussion_r734818873
##########
File path: buildSrc/src/main/groovy/org/apache/geode/gradle/plugins/DependencyConstraints.groovy
##########
@@ -162,6 +162,7 @@ class DependencyConstraints implements Plugin<Project> {
api(group: 'org.jctools', name: 'jctools-core', version: '3.3.0')
api(group: 'org.jgroups', name: 'jgroups', version: get('jgroups.version'))
api(group: 'org.mockito', name: 'mockito-core', version: '3.12.4')
+ api(group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.11.2')
Review comment:
Consider making this version the same as `mockito-core` which is `3.12.4`.
##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/PRHARedundancyProviderFactory.java
##########
@@ -0,0 +1,19 @@
+/*
+ * 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.internal.cache;
+
+public interface PRHARedundancyProviderFactory {
Review comment:
Add `FunctionalInterface` annotation.
##########
File path: geode-core/src/test/java/org/apache/geode/internal/cache/PartitionedRegionCacheCallbackTest.java
##########
@@ -0,0 +1,199 @@
+/*
+ * 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.internal.cache;
+
+import static java.util.Arrays.asList;
+import static org.apache.geode.internal.statistics.StatisticsClockFactory.disabledClock;
+import static org.apache.geode.util.internal.UncheckedUtils.uncheckedCast;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+import static org.mockito.quality.Strictness.STRICT_STUBS;
+
+import java.util.HashSet;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import junitparams.JUnitParamsRunner;
+import junitparams.Parameters;
+import junitparams.naming.TestCaseName;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.junit.MockitoJUnit;
+import org.mockito.junit.MockitoRule;
+
+import org.apache.geode.annotations.internal.MakeNotStatic;
+import org.apache.geode.cache.AttributesFactory;
+import org.apache.geode.cache.CacheLoader;
+import org.apache.geode.cache.CacheWriter;
+import org.apache.geode.cache.PartitionAttributes;
+import org.apache.geode.cache.PartitionAttributesFactory;
+import org.apache.geode.cache.Region;
+import org.apache.geode.distributed.internal.DSClock;
+import org.apache.geode.distributed.internal.DistributionManager;
+import org.apache.geode.distributed.internal.InternalDistributedSystem;
+import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
+import org.apache.geode.internal.cache.control.InternalResourceManager;
+import org.apache.geode.internal.cache.partitioned.DefaultPartitionMessageDistribution;
+import org.apache.geode.internal.cache.partitioned.RegionAdvisorFactory;
+import org.apache.geode.internal.cache.partitioned.RetryTimeKeeper;
+import org.apache.geode.internal.cache.partitioned.colocation.ColocationLoggerFactory;
+
+@RunWith(JUnitParamsRunner.class)
+public class PartitionedRegionCacheCallbackTest {
+
+ // TODO: DHE Why is this static?
Review comment:
Resolve TODO before merge.
##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegionDataStoreFactory.java
##########
@@ -0,0 +1,19 @@
+/*
+ * 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.internal.cache;
+
+public interface PartitionedRegionDataStoreFactory {
Review comment:
Add `@FunctionInterface` annotation.
##########
File path: geode-core/src/main/java/org/apache/geode/cache/PartitionAttributes.java
##########
@@ -172,4 +172,6 @@
return configAttributes;
}
+
+ void setOffHeap(boolean offHeap);
Review comment:
Remove from interface to fix binary incompatibility.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org