[2/8] incubator-geode git commit: GEODE-1937: Fixing failures from the example tests
GEODE-1937: Fixing failures from the example tests Setting a default GEODE_HOME to use when running example tests. Fixing the example tests scripts to indicate that they are bash scripts as the first line in the header. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/62bd240f Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/62bd240f Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/62bd240f Branch: refs/heads/feature/GEODE-1801 Commit: 62bd240f28258620e5140d52ce21c2004598f7ea Parents: 55a6584 Author: Dan SmithAuthored: Mon Sep 26 11:03:25 2016 -0700 Committer: Dan Smith Committed: Tue Sep 27 10:43:56 2016 -0700 -- geode-examples/build.gradle| 6 ++ geode-examples/replicated/scripts/pidkiller.sh | 5 ++--- geode-examples/replicated/scripts/setEnv.sh| 2 +- geode-examples/replicated/scripts/startAll.sh | 2 +- geode-examples/replicated/scripts/stopAll.sh | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/build.gradle -- diff --git a/geode-examples/build.gradle b/geode-examples/build.gradle index 1eadc31..1e638bc 100644 --- a/geode-examples/build.gradle +++ b/geode-examples/build.gradle @@ -48,6 +48,12 @@ subprojects { } } +test { + def geodeHome = System.getenv('GEODE_HOME'); + geodeHome = geodeHome != null ? geodeHome : file('../../geode-assembly/build/install/apache-geode/').absolutePath + environment 'GEODE_HOME': geodeHome +} + } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/pidkiller.sh -- diff --git a/geode-examples/replicated/scripts/pidkiller.sh b/geode-examples/replicated/scripts/pidkiller.sh index 1a3eaf2..ecf8f2d 100755 --- a/geode-examples/replicated/scripts/pidkiller.sh +++ b/geode-examples/replicated/scripts/pidkiller.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -14,9 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash -# -# @brief Script that look for .pid files on a directory and kill those processes. +# @brief Script that look for .pid files on a directory and kill those processes. # export DIR=$1 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/setEnv.sh -- diff --git a/geode-examples/replicated/scripts/setEnv.sh b/geode-examples/replicated/scripts/setEnv.sh index 60befc6..e9e860e 100755 --- a/geode-examples/replicated/scripts/setEnv.sh +++ b/geode-examples/replicated/scripts/setEnv.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -14,7 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash ## check if locator port has been set otherwise set to default export GEODE_LOCATOR_PORT="${GEODE_LOCATOR_PORT:-10334}" http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/startAll.sh -- diff --git a/geode-examples/replicated/scripts/startAll.sh b/geode-examples/replicated/scripts/startAll.sh index f4ce413..2b08f19 100755 --- a/geode-examples/replicated/scripts/startAll.sh +++ b/geode-examples/replicated/scripts/startAll.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -14,7 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash set -e http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/stopAll.sh -- diff --git a/geode-examples/replicated/scripts/stopAll.sh b/geode-examples/replicated/scripts/stopAll.sh index 2a2c39b..a6364a8 100755 --- a/geode-examples/replicated/scripts/stopAll.sh +++ b/geode-examples/replicated/scripts/stopAll.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more
[5/8] incubator-geode git commit: GEODE-1939: change test category to IntegrationTest
GEODE-1939: change test category to IntegrationTest * remove class hierarchy because it repeats running of tests * reformat, privatize vars and methods * remove catching of unexpected exceptions * remove system out statements * move all setup to setup method * fix minor concurrency bug in JSSESocketJUnitTest Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ddf4f3db Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ddf4f3db Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ddf4f3db Branch: refs/heads/feature/GEODE-1801 Commit: ddf4f3dbc6cbd1ca68ba812128c25163aa5c23ac Parents: 9f422dd Author: Kirk LundAuthored: Tue Sep 27 13:50:21 2016 -0700 Committer: Kirk Lund Committed: Tue Sep 27 13:54:40 2016 -0700 -- .../geode/internal/net/JSSESocketJUnitTest.java | 111 ++- .../net/SocketCreatorFactoryJUnitTest.java | 77 +++-- 2 files changed, 76 insertions(+), 112 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ddf4f3db/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java index 4a62ec7..e63a46f 100755 --- a/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java @@ -30,6 +30,8 @@ import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; @@ -43,9 +45,12 @@ import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.junit.contrib.java.lang.system.SystemErrRule; +import org.junit.contrib.java.lang.system.SystemOutRule; import org.junit.experimental.categories.Category; import org.junit.rules.TestName; +import org.apache.geode.distributed.ClientSocketFactory; import org.apache.geode.distributed.internal.DistributionConfig; import org.apache.geode.distributed.internal.DistributionConfigImpl; import org.apache.geode.internal.AvailablePort; @@ -62,48 +67,39 @@ import org.apache.geode.util.test.TestUtil; @Category(IntegrationTest.class) public class JSSESocketJUnitTest { - public - @Rule - TestName name = new TestName(); - - private static final org.apache.logging.log4j.Logger logger = LogService.getLogger(); + private static volatile boolean factoryInvoked; - ServerSocket acceptor; - Socket server; + private ServerSocket acceptor; + private Socket server; + private int randport; - static ByteArrayOutputStream baos = new ByteArrayOutputStream(); + @Rule + public TestName name = new TestName(); - private int randport = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); + @Rule + public SystemOutRule systemOutRule = new SystemOutRule(); @Before public void setUp() throws Exception { -System.out.println("\n\n## setup " + name.getMethodName() + " \n\n"); -server = null; -acceptor = null; -baos.reset(); +randport = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); } @After public void tearDown() throws Exception { -System.out.println("\n\n## teardown " + name.getMethodName() + " \n\n"); - if (server != null) { server.close(); } if (acceptor != null) { acceptor.close(); } -System.out.println(baos.toString()); SocketCreatorFactory.close(); } - //- test methods -- - @Test public void testSSLSocket() throws Exception { -final Object[] receiver = new Object[1]; +systemOutRule.mute().enableLog(); -TestAppender.create(); +final Object[] receiver = new Object[1]; // Get original base log level Level originalBaseLevel = LogService.getBaseLogLevel(); @@ -136,7 +132,7 @@ public class JSSESocketJUnitTest { Socket client = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).connectForServer(InetAddress.getByName("localhost"), randport); ObjectOutputStream oos = new ObjectOutputStream(client.getOutputStream()); - String expected = new String("testing " + name.getMethodName()); + String expected = "testing " + name.getMethodName(); oos.writeObject(expected); oos.flush(); @@ -144,27 +140,19 @@ public class JSSESocketJUnitTest {
[1/8] incubator-geode git commit: GEODE-1885: fix infinite loop
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1801 4345fda73 -> eafd8cc9c GEODE-1885: fix infinite loop The previous fix for GEODE-1885 introduced a hang on off-heap regions. If a concurrent close/destroy of the region happens while other threads are modifying it then the thread doing the modification can get stuck in a hot loop that never terminates. The hot loop is in AbstractRegionMap when it tests the existing region entry it finds to see if it can be modified. If the region entry has a value that says it is removed then the operation spins around and tries again. It expects the thread that marked it as being removed to also remove it from the map. The previous fix for GEODE-1885 can cause a remove to not happen. So this fix does two things: 1. On retry remove the existing removed region entry from the map. 2. putEntryIfAbsent now only releases the current entry if it has an off-heap reference. This prevents an infinite loop that was caused by the current thread who just added a new entry with REMOVE_PHASE1 from releasing it (changing it to REMOVE_PHASE2) because it sees that the region is closed/destroyed. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/55a65840 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/55a65840 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/55a65840 Branch: refs/heads/feature/GEODE-1801 Commit: 55a65840a4e4d427acaed1182aca869bf92ecae6 Parents: 6555c31 Author: Darrel SchneiderAuthored: Fri Sep 23 10:53:35 2016 -0700 Committer: Darrel Schneider Committed: Mon Sep 26 14:43:12 2016 -0700 -- .../geode/internal/cache/AbstractRegionMap.java | 59 ++-- 1 file changed, 30 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/55a65840/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java -- diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java index 33e98b6..5861e9a 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java @@ -48,6 +48,7 @@ import org.apache.geode.internal.logging.log4j.LogMarker; import org.apache.geode.internal.offheap.OffHeapHelper; import org.apache.geode.internal.offheap.OffHeapRegionEntryHelper; import org.apache.geode.internal.offheap.ReferenceCountHelper; +import org.apache.geode.internal.offheap.StoredObject; import org.apache.geode.internal.offheap.annotations.Released; import org.apache.geode.internal.offheap.annotations.Retained; import org.apache.geode.internal.offheap.annotations.Unretained; @@ -246,15 +247,19 @@ public abstract class AbstractRegionMap implements RegionMap { public final RegionEntry putEntryIfAbsent(Object key, RegionEntry re) { -RegionEntry value = (RegionEntry)_getMap().putIfAbsent(key, re); -if (value == null && (re instanceof OffHeapRegionEntry) +RegionEntry oldRe = (RegionEntry)_getMap().putIfAbsent(key, re); +if (oldRe == null && (re instanceof OffHeapRegionEntry) && _isOwnerALocalRegion() && _getOwner().isThisRegionBeingClosedOrDestroyed()) { // prevent orphan during concurrent destroy (#48068) - if (_getMap().remove(key, re)) { -((OffHeapRegionEntry)re).release(); + Object v = re._getValue(); + if (v != Token.REMOVED_PHASE1 && v != Token.REMOVED_PHASE2 + && v instanceof StoredObject && ((StoredObject)v).hasRefCount()) { +if (_getMap().remove(key, re)) { + ((OffHeapRegionEntry)re).release(); +} } } -return value; +return oldRe; } @Override @@ -640,12 +645,11 @@ public abstract class AbstractRegionMap implements RegionMap { while (oldRe != null) { synchronized (oldRe) { if (oldRe.isRemoved() && !oldRe.isTombstone()) { -oldRe = putEntryIfAbsent(key, newRe); -if (oldRe != null) { - if (_isOwnerALocalRegion()) { -_getOwner().getCachePerfStats().incRetries(); - } +if (_isOwnerALocalRegion()) { + _getOwner().getCachePerfStats().incRetries(); } +_getMap().remove(key, oldRe); +oldRe = putEntryIfAbsent(key, newRe); } /* * Entry already exists which should be impossible. @@ -844,10 +848,9 @@ public abstract class AbstractRegionMap implements RegionMap { while
[7/8] incubator-geode git commit: GEODE-1937: Don't use a relative path to the geode-examples location
GEODE-1937: Don't use a relative path to the geode-examples location Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0ad18488 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0ad18488 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0ad18488 Branch: refs/heads/feature/GEODE-1801 Commit: 0ad18488b800f34cca41cab022948ef3355d73d7 Parents: 1890e60 Author: Dan SmithAuthored: Tue Sep 27 16:10:46 2016 -0700 Committer: Dan Smith Committed: Tue Sep 27 16:11:52 2016 -0700 -- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0ad18488/build.gradle -- diff --git a/build.gradle b/build.gradle index b360c40..bc31c92 100755 --- a/build.gradle +++ b/build.gradle @@ -87,13 +87,13 @@ subprojects { } task cleanExamples(type: GradleBuild) { - buildFile = 'geode-examples/build.gradle' + buildFile = "${rootProject.projectDir}/geode-examples/build.gradle" tasks = ['clean'] } clean.dependsOn cleanExamples task buildExamples(type: GradleBuild, dependsOn: ':geode-assembly:installDist') { - buildFile = 'geode-examples/build.gradle' + buildFile = "${rootProject.projectDir}/geode-examples/build.gradle" tasks = ['build'] }
[8/8] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-1801
Merge branch 'develop' into feature/GEODE-1801 Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/eafd8cc9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/eafd8cc9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/eafd8cc9 Branch: refs/heads/feature/GEODE-1801 Commit: eafd8cc9c85f70203ab812e308423791cdbfd581 Parents: 4345fda 0ad1848 Author: Udo KohlmeyerAuthored: Wed Sep 28 09:35:34 2016 +1000 Committer: Udo Kohlmeyer Committed: Wed Sep 28 09:35:34 2016 +1000 -- build.gradle| 11 ++ etc/eclipseFormatterProfile.xml | 2 +- etc/intellijIdeaCodeStyle.xml | 2 + geode-assembly/build.gradle | 2 + .../geode/internal/cache/AbstractRegionMap.java | 59 +- .../geode/internal/net/JSSESocketJUnitTest.java | 111 ++- .../net/SocketCreatorFactoryJUnitTest.java | 77 +++-- .../security/AbstractSecureServerDUnitTest.java | 7 +- ...ientRegisterInterestAuthDistributedTest.java | 1 - geode-examples/build.gradle | 6 + geode-examples/replicated/scripts/pidkiller.sh | 5 +- geode-examples/replicated/scripts/setEnv.sh | 2 +- geode-examples/replicated/scripts/startAll.sh | 2 +- geode-examples/replicated/scripts/stopAll.sh| 2 +- 14 files changed, 138 insertions(+), 151 deletions(-) --
[6/8] incubator-geode git commit: GEODE-1769: add the ignored exception to the AbstractSecureServerDUnitTest
GEODE-1769: add the ignored exception to the AbstractSecureServerDUnitTest Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/1890e60e Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1890e60e Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1890e60e Branch: refs/heads/feature/GEODE-1801 Commit: 1890e60e231767d6e94712483e29cd86a68ce51b Parents: ddf4f3d Author: Jinmei LiaoAuthored: Tue Sep 27 11:00:14 2016 -0700 Committer: Jinmei Liao Committed: Tue Sep 27 14:04:42 2016 -0700 -- .../apache/geode/security/AbstractSecureServerDUnitTest.java | 7 +-- .../IntegratedClientRegisterInterestAuthDistributedTest.java | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1890e60e/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java b/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java index 23b851a..435b426 100644 --- a/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java @@ -24,7 +24,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Properties; -import org.apache.geode.security.templates.SampleSecurityManager; import org.assertj.core.api.ThrowableAssert.ThrowingCallable; import org.junit.Before; @@ -36,9 +35,11 @@ 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.server.CacheServer; -import org.apache.geode.distributed.*; +import org.apache.geode.distributed.ConfigurationProperties; +import org.apache.geode.security.templates.SampleSecurityManager; import org.apache.geode.security.templates.UserPasswordAuthInit; import org.apache.geode.test.dunit.Host; +import org.apache.geode.test.dunit.IgnoredException; import org.apache.geode.test.dunit.Invoke; import org.apache.geode.test.dunit.VM; import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase; @@ -69,6 +70,8 @@ public class AbstractSecureServerDUnitTest extends JUnit4CacheTestCase { @Before public void before() throws Exception { +IgnoredException.addIgnoredException("No longer connected to localhost"); + final Host host = Host.getHost(0); this.client1 = host.getVM(1); this.client2 = host.getVM(2); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1890e60e/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java b/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java index f897b5e..d066e9d 100644 --- a/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java +++ b/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java @@ -32,7 +32,6 @@ import org.apache.geode.test.junit.categories.SecurityTest; @Category({ DistributedTest.class, SecurityTest.class }) public class IntegratedClientRegisterInterestAuthDistributedTest extends AbstractSecureServerDUnitTest { - @Test public void testRegisterInterest() throws InterruptedException { // client1 connects to server as a user not authorized to do any operations
[4/8] incubator-geode git commit: GEODE-1940: increase line length to prevent line-wrapping
GEODE-1940: increase line length to prevent line-wrapping Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/9f422dd3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/9f422dd3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/9f422dd3 Branch: refs/heads/feature/GEODE-1801 Commit: 9f422dd39ac5311db26431fb96e5adfc32546119 Parents: 8a6a46a Author: Kirk LundAuthored: Tue Sep 27 12:48:24 2016 -0700 Committer: Kirk Lund Committed: Tue Sep 27 13:54:39 2016 -0700 -- etc/eclipseFormatterProfile.xml | 2 +- etc/intellijIdeaCodeStyle.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f422dd3/etc/eclipseFormatterProfile.xml -- diff --git a/etc/eclipseFormatterProfile.xml b/etc/eclipseFormatterProfile.xml index ead2f39..b9f8410 100755 --- a/etc/eclipseFormatterProfile.xml +++ b/etc/eclipseFormatterProfile.xml @@ -288,7 +288,7 @@ - + http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f422dd3/etc/intellijIdeaCodeStyle.xml -- diff --git a/etc/intellijIdeaCodeStyle.xml b/etc/intellijIdeaCodeStyle.xml index 5b01917..0b5c31b 100755 --- a/etc/intellijIdeaCodeStyle.xml +++ b/etc/intellijIdeaCodeStyle.xml @@ -60,6 +60,7 @@ + @@ -82,6 +83,7 @@ +
incubator-geode git commit: GEODE-1937: Don't use a relative path to the geode-examples location
Repository: incubator-geode Updated Branches: refs/heads/develop 1890e60e2 -> 0ad18488b GEODE-1937: Don't use a relative path to the geode-examples location Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/0ad18488 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/0ad18488 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/0ad18488 Branch: refs/heads/develop Commit: 0ad18488b800f34cca41cab022948ef3355d73d7 Parents: 1890e60 Author: Dan SmithAuthored: Tue Sep 27 16:10:46 2016 -0700 Committer: Dan Smith Committed: Tue Sep 27 16:11:52 2016 -0700 -- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/0ad18488/build.gradle -- diff --git a/build.gradle b/build.gradle index b360c40..bc31c92 100755 --- a/build.gradle +++ b/build.gradle @@ -87,13 +87,13 @@ subprojects { } task cleanExamples(type: GradleBuild) { - buildFile = 'geode-examples/build.gradle' + buildFile = "${rootProject.projectDir}/geode-examples/build.gradle" tasks = ['clean'] } clean.dependsOn cleanExamples task buildExamples(type: GradleBuild, dependsOn: ':geode-assembly:installDist') { - buildFile = 'geode-examples/build.gradle' + buildFile = "${rootProject.projectDir}/geode-examples/build.gradle" tasks = ['build'] }
incubator-geode git commit: GEODE-1938: Update with review comments. Cleaned up the error handling for getAllPools()
Repository: incubator-geode Updated Branches: refs/heads/feature/GEODE-1801 4609eace0 -> 4345fda73 GEODE-1938: Update with review comments. Cleaned up the error handling for getAllPools() Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/4345fda7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/4345fda7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/4345fda7 Branch: refs/heads/feature/GEODE-1801 Commit: 4345fda73f426755e05eaa5c8c17080bafddc4eb Parents: 4609eac Author: Udo KohlmeyerAuthored: Wed Sep 28 07:44:23 2016 +1000 Committer: Udo Kohlmeyer Committed: Wed Sep 28 07:44:23 2016 +1000 -- .../pdx/internal/ClientTypeRegistration.java| 57 ++-- 1 file changed, 17 insertions(+), 40 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4345fda7/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java -- diff --git a/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java b/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java index 261cc53..8957e7f 100644 --- a/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java +++ b/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java @@ -41,9 +41,6 @@ import org.apache.geode.internal.cache.PoolManagerImpl; import org.apache.geode.internal.logging.LogService; import org.apache.logging.log4j.Logger; -/** - * - */ public class ClientTypeRegistration implements TypeRegistration { private static final Logger logger = LogService.getLogger(); @@ -63,7 +60,7 @@ public class ClientTypeRegistration implements TypeRegistration { try { newTypeId = GetPDXIdForTypeOp.execute((ExecutablePool) pool, newType); newType.setTypeId(newTypeId); -sendTypeToAllPools(newType, newTypeId, pool); +sendTypeToPool(newType, newTypeId, pool); return newTypeId; } catch (ServerConnectivityException e) { //ignore, try the next pool. @@ -73,7 +70,7 @@ public class ClientTypeRegistration implements TypeRegistration { throw returnCorrectExceptionForFailure(pools, newTypeId, lastException); } - private void sendTypeToAllPools(PdxType type, int id, Pool pool) { + private void sendTypeToPool(PdxType type, int id, Pool pool) { try { AddPDXTypeOp.execute((ExecutablePool) pool, id, type); } catch (ServerConnectivityException serverConnectivityException) { @@ -102,26 +99,26 @@ public class ClientTypeRegistration implements TypeRegistration { if (lastException != null) { throw lastException; } else { - if (pools.isEmpty()) { -if (this.cache.isClosed()) { - throw this.cache.getCacheClosedException("PDX detected cache was closed", null); -} else { - throw new CacheClosedException("Client pools have been closed so the PDX type registry can not lookup a type."); -} - } else { -throw new InternalGemFireError("getType: Unable to determine PDXType for id " + typeId + " from existing client to server pools " + pools); - } + throw returnCorrectExceptionForFailure(pools, typeId, lastException); } } - private static Collection getAllPools() { + private Collection getAllPools() { Collection pools = PoolManagerImpl.getPMI().getMap().values(); + for (Iterator itr = pools.iterator(); itr.hasNext(); ) { PoolImpl pool = (PoolImpl) itr.next(); if (pool.isUsedByGateway()) { itr.remove(); } } + +if (pools.isEmpty()) { + if (this.cache.isClosed()) { +throw new CacheClosedException("PDX detected cache was closed"); + } + throw new CacheClosedException("Client pools have been closed so the PDX type registry is not available."); +} return pools; } @@ -160,7 +157,7 @@ public class ClientTypeRegistration implements TypeRegistration { for (Pool pool : pools) { try { int result = GetPDXIdForEnumOp.execute((ExecutablePool) pool, enumInfo); -sendEnumIdToAllPools(enumInfo, result, pool); +sendEnumIdToPool(enumInfo, result, pool); return result; } catch (ServerConnectivityException e) { //ignore, try the next pool. @@ -170,7 +167,7 @@ public class ClientTypeRegistration implements TypeRegistration { throw returnCorrectExceptionForFailure(pools, -1, lastException); } - private void sendEnumIdToAllPools(EnumInfo enumInfo, int id, Pool pool) { + private void sendEnumIdToPool(EnumInfo enumInfo, int id, Pool pool) {
incubator-geode git commit: GEODE-1769: add the ignored exception to the AbstractSecureServerDUnitTest
Repository: incubator-geode Updated Branches: refs/heads/develop ddf4f3dbc -> 1890e60e2 GEODE-1769: add the ignored exception to the AbstractSecureServerDUnitTest Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/1890e60e Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/1890e60e Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/1890e60e Branch: refs/heads/develop Commit: 1890e60e231767d6e94712483e29cd86a68ce51b Parents: ddf4f3d Author: Jinmei LiaoAuthored: Tue Sep 27 11:00:14 2016 -0700 Committer: Jinmei Liao Committed: Tue Sep 27 14:04:42 2016 -0700 -- .../apache/geode/security/AbstractSecureServerDUnitTest.java | 7 +-- .../IntegratedClientRegisterInterestAuthDistributedTest.java | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1890e60e/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java b/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java index 23b851a..435b426 100644 --- a/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/security/AbstractSecureServerDUnitTest.java @@ -24,7 +24,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Properties; -import org.apache.geode.security.templates.SampleSecurityManager; import org.assertj.core.api.ThrowableAssert.ThrowingCallable; import org.junit.Before; @@ -36,9 +35,11 @@ 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.server.CacheServer; -import org.apache.geode.distributed.*; +import org.apache.geode.distributed.ConfigurationProperties; +import org.apache.geode.security.templates.SampleSecurityManager; import org.apache.geode.security.templates.UserPasswordAuthInit; import org.apache.geode.test.dunit.Host; +import org.apache.geode.test.dunit.IgnoredException; import org.apache.geode.test.dunit.Invoke; import org.apache.geode.test.dunit.VM; import org.apache.geode.test.dunit.cache.internal.JUnit4CacheTestCase; @@ -69,6 +70,8 @@ public class AbstractSecureServerDUnitTest extends JUnit4CacheTestCase { @Before public void before() throws Exception { +IgnoredException.addIgnoredException("No longer connected to localhost"); + final Host host = Host.getHost(0); this.client1 = host.getVM(1); this.client2 = host.getVM(2); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1890e60e/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java b/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java index f897b5e..d066e9d 100644 --- a/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java +++ b/geode-core/src/test/java/org/apache/geode/security/IntegratedClientRegisterInterestAuthDistributedTest.java @@ -32,7 +32,6 @@ import org.apache.geode.test.junit.categories.SecurityTest; @Category({ DistributedTest.class, SecurityTest.class }) public class IntegratedClientRegisterInterestAuthDistributedTest extends AbstractSecureServerDUnitTest { - @Test public void testRegisterInterest() throws InterruptedException { // client1 connects to server as a user not authorized to do any operations
[2/2] incubator-geode git commit: GEODE-1939: change test category to IntegrationTest
GEODE-1939: change test category to IntegrationTest * remove class hierarchy because it repeats running of tests * reformat, privatize vars and methods * remove catching of unexpected exceptions * remove system out statements * move all setup to setup method * fix minor concurrency bug in JSSESocketJUnitTest Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ddf4f3db Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ddf4f3db Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ddf4f3db Branch: refs/heads/develop Commit: ddf4f3dbc6cbd1ca68ba812128c25163aa5c23ac Parents: 9f422dd Author: Kirk LundAuthored: Tue Sep 27 13:50:21 2016 -0700 Committer: Kirk Lund Committed: Tue Sep 27 13:54:40 2016 -0700 -- .../geode/internal/net/JSSESocketJUnitTest.java | 111 ++- .../net/SocketCreatorFactoryJUnitTest.java | 77 +++-- 2 files changed, 76 insertions(+), 112 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ddf4f3db/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java -- diff --git a/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java index 4a62ec7..e63a46f 100755 --- a/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/internal/net/JSSESocketJUnitTest.java @@ -30,6 +30,8 @@ import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; @@ -43,9 +45,12 @@ import org.junit.After; import org.junit.Before; import org.junit.Rule; import org.junit.Test; +import org.junit.contrib.java.lang.system.SystemErrRule; +import org.junit.contrib.java.lang.system.SystemOutRule; import org.junit.experimental.categories.Category; import org.junit.rules.TestName; +import org.apache.geode.distributed.ClientSocketFactory; import org.apache.geode.distributed.internal.DistributionConfig; import org.apache.geode.distributed.internal.DistributionConfigImpl; import org.apache.geode.internal.AvailablePort; @@ -62,48 +67,39 @@ import org.apache.geode.util.test.TestUtil; @Category(IntegrationTest.class) public class JSSESocketJUnitTest { - public - @Rule - TestName name = new TestName(); - - private static final org.apache.logging.log4j.Logger logger = LogService.getLogger(); + private static volatile boolean factoryInvoked; - ServerSocket acceptor; - Socket server; + private ServerSocket acceptor; + private Socket server; + private int randport; - static ByteArrayOutputStream baos = new ByteArrayOutputStream(); + @Rule + public TestName name = new TestName(); - private int randport = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); + @Rule + public SystemOutRule systemOutRule = new SystemOutRule(); @Before public void setUp() throws Exception { -System.out.println("\n\n## setup " + name.getMethodName() + " \n\n"); -server = null; -acceptor = null; -baos.reset(); +randport = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); } @After public void tearDown() throws Exception { -System.out.println("\n\n## teardown " + name.getMethodName() + " \n\n"); - if (server != null) { server.close(); } if (acceptor != null) { acceptor.close(); } -System.out.println(baos.toString()); SocketCreatorFactory.close(); } - //- test methods -- - @Test public void testSSLSocket() throws Exception { -final Object[] receiver = new Object[1]; +systemOutRule.mute().enableLog(); -TestAppender.create(); +final Object[] receiver = new Object[1]; // Get original base log level Level originalBaseLevel = LogService.getBaseLogLevel(); @@ -136,7 +132,7 @@ public class JSSESocketJUnitTest { Socket client = SocketCreatorFactory.getSocketCreatorForComponent(SecurableCommunicationChannel.CLUSTER).connectForServer(InetAddress.getByName("localhost"), randport); ObjectOutputStream oos = new ObjectOutputStream(client.getOutputStream()); - String expected = new String("testing " + name.getMethodName()); + String expected = "testing " + name.getMethodName(); oos.writeObject(expected); oos.flush(); @@ -144,27 +140,19 @@ public class JSSESocketJUnitTest { client.close();
[1/2] incubator-geode git commit: GEODE-1940: increase line length to prevent line-wrapping
Repository: incubator-geode Updated Branches: refs/heads/develop 8a6a46abd -> ddf4f3dbc GEODE-1940: increase line length to prevent line-wrapping Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/9f422dd3 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/9f422dd3 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/9f422dd3 Branch: refs/heads/develop Commit: 9f422dd39ac5311db26431fb96e5adfc32546119 Parents: 8a6a46a Author: Kirk LundAuthored: Tue Sep 27 12:48:24 2016 -0700 Committer: Kirk Lund Committed: Tue Sep 27 13:54:39 2016 -0700 -- etc/eclipseFormatterProfile.xml | 2 +- etc/intellijIdeaCodeStyle.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f422dd3/etc/eclipseFormatterProfile.xml -- diff --git a/etc/eclipseFormatterProfile.xml b/etc/eclipseFormatterProfile.xml index ead2f39..b9f8410 100755 --- a/etc/eclipseFormatterProfile.xml +++ b/etc/eclipseFormatterProfile.xml @@ -288,7 +288,7 @@ - + http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/9f422dd3/etc/intellijIdeaCodeStyle.xml -- diff --git a/etc/intellijIdeaCodeStyle.xml b/etc/intellijIdeaCodeStyle.xml index 5b01917..0b5c31b 100755 --- a/etc/intellijIdeaCodeStyle.xml +++ b/etc/intellijIdeaCodeStyle.xml @@ -60,6 +60,7 @@ + @@ -82,6 +83,7 @@ +
[2/2] incubator-geode git commit: GEODE-1937: Fixing failures from the example tests
GEODE-1937: Fixing failures from the example tests Setting a default GEODE_HOME to use when running example tests. Fixing the example tests scripts to indicate that they are bash scripts as the first line in the header. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/62bd240f Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/62bd240f Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/62bd240f Branch: refs/heads/develop Commit: 62bd240f28258620e5140d52ce21c2004598f7ea Parents: 55a6584 Author: Dan SmithAuthored: Mon Sep 26 11:03:25 2016 -0700 Committer: Dan Smith Committed: Tue Sep 27 10:43:56 2016 -0700 -- geode-examples/build.gradle| 6 ++ geode-examples/replicated/scripts/pidkiller.sh | 5 ++--- geode-examples/replicated/scripts/setEnv.sh| 2 +- geode-examples/replicated/scripts/startAll.sh | 2 +- geode-examples/replicated/scripts/stopAll.sh | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/build.gradle -- diff --git a/geode-examples/build.gradle b/geode-examples/build.gradle index 1eadc31..1e638bc 100644 --- a/geode-examples/build.gradle +++ b/geode-examples/build.gradle @@ -48,6 +48,12 @@ subprojects { } } +test { + def geodeHome = System.getenv('GEODE_HOME'); + geodeHome = geodeHome != null ? geodeHome : file('../../geode-assembly/build/install/apache-geode/').absolutePath + environment 'GEODE_HOME': geodeHome +} + } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/pidkiller.sh -- diff --git a/geode-examples/replicated/scripts/pidkiller.sh b/geode-examples/replicated/scripts/pidkiller.sh index 1a3eaf2..ecf8f2d 100755 --- a/geode-examples/replicated/scripts/pidkiller.sh +++ b/geode-examples/replicated/scripts/pidkiller.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -14,9 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash -# -# @brief Script that look for .pid files on a directory and kill those processes. +# @brief Script that look for .pid files on a directory and kill those processes. # export DIR=$1 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/setEnv.sh -- diff --git a/geode-examples/replicated/scripts/setEnv.sh b/geode-examples/replicated/scripts/setEnv.sh index 60befc6..e9e860e 100755 --- a/geode-examples/replicated/scripts/setEnv.sh +++ b/geode-examples/replicated/scripts/setEnv.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -14,7 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash ## check if locator port has been set otherwise set to default export GEODE_LOCATOR_PORT="${GEODE_LOCATOR_PORT:-10334}" http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/startAll.sh -- diff --git a/geode-examples/replicated/scripts/startAll.sh b/geode-examples/replicated/scripts/startAll.sh index f4ce413..2b08f19 100755 --- a/geode-examples/replicated/scripts/startAll.sh +++ b/geode-examples/replicated/scripts/startAll.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -14,7 +15,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # -#!/bin/bash set -e http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/62bd240f/geode-examples/replicated/scripts/stopAll.sh -- diff --git a/geode-examples/replicated/scripts/stopAll.sh b/geode-examples/replicated/scripts/stopAll.sh index 2a2c39b..a6364a8 100755 --- a/geode-examples/replicated/scripts/stopAll.sh +++ b/geode-examples/replicated/scripts/stopAll.sh @@ -1,3 +1,4 @@ +#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one or more #
[1/2] incubator-geode git commit: GEODE-1937: Making precheckin depend on running examples
Repository: incubator-geode Updated Branches: refs/heads/develop 55a65840a -> 8a6a46abd GEODE-1937: Making precheckin depend on running examples Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8a6a46ab Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8a6a46ab Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8a6a46ab Branch: refs/heads/develop Commit: 8a6a46abde1a7f08fcf4605877f60ce9480fb296 Parents: 62bd240 Author: Dan SmithAuthored: Mon Sep 26 11:18:41 2016 -0700 Committer: Dan Smith Committed: Tue Sep 27 10:43:56 2016 -0700 -- build.gradle| 11 +++ geode-assembly/build.gradle | 2 ++ 2 files changed, 13 insertions(+) -- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a6a46ab/build.gradle -- diff --git a/build.gradle b/build.gradle index f7ce6bc..b360c40 100755 --- a/build.gradle +++ b/build.gradle @@ -86,3 +86,14 @@ subprojects { clean.finalizedBy rootProject.cleanAll } +task cleanExamples(type: GradleBuild) { + buildFile = 'geode-examples/build.gradle' + tasks = ['clean'] +} + +clean.dependsOn cleanExamples + +task buildExamples(type: GradleBuild, dependsOn: ':geode-assembly:installDist') { + buildFile = 'geode-examples/build.gradle' + tasks = ['build'] +} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a6a46ab/geode-assembly/build.gradle -- diff --git a/geode-assembly/build.gradle b/geode-assembly/build.gradle index a83b7a9..2b960eb 100755 --- a/geode-assembly/build.gradle +++ b/geode-assembly/build.gradle @@ -387,6 +387,8 @@ flakyTest dependOnInstalledProduct // Make build final task to generate all test and product resources build.dependsOn installDist +precheckin.dependsOn ':buildExamples' + installDist.dependsOn ':extensions/geode-modules-assembly:dist' /**Print the names of all jar files in a fileTree */