[geode] branch develop updated: GEODE-5656: Upgrades Gradle to 4.10 (#2397)
This is an automated email from the ASF dual-hosted git repository. jbarrett pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new be5430d GEODE-5656: Upgrades Gradle to 4.10 (#2397) be5430d is described below commit be5430d92966733fbdfe9d63e60bc7ef0168ea76 Author: Jacob Barrett AuthorDate: Tue Aug 28 20:38:21 2018 -0700 GEODE-5656: Upgrades Gradle to 4.10 (#2397) --- gradle.properties| 2 +- gradle/wrapper/gradle-wrapper.jar| Bin 54413 -> 56172 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2e3e07d..3edf13d 100755 --- a/gradle.properties +++ b/gradle.properties @@ -44,7 +44,7 @@ productOrg = Apache Software Foundation (ASF) org.gradle.daemon = true org.gradle.jvmargs = -Xmx3g -minimumGradleVersion = 4.9 +minimumGradleVersion = 4.10 # Set this on the command line with -P or in ~/.gradle/gradle.properties # to change the buildDir location. Use an absolute path. buildRoot= diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 0d4a951..28861d2 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7dc503f..f73107d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
[geode] branch develop updated: GEODE-5636: DescribeClientCommandDUnitTest fails on Windows (#2382)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 238706c GEODE-5636: DescribeClientCommandDUnitTest fails on Windows (#2382) 238706c is described below commit 238706c1c851a6ae8c11ed216354cf2599917256 Author: Jens Deppe AuthorDate: Tue Aug 28 20:27:27 2018 -0700 GEODE-5636: DescribeClientCommandDUnitTest fails on Windows (#2382) --- .../internal/cli/commands/DescribeClientCommandDUnitTest.java| 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/geode-cq/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/DescribeClientCommandDUnitTest.java b/geode-cq/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/DescribeClientCommandDUnitTest.java index 96554bb..3b5c1d7 100644 --- a/geode-cq/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/DescribeClientCommandDUnitTest.java +++ b/geode-cq/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/DescribeClientCommandDUnitTest.java @@ -119,8 +119,9 @@ public class DescribeClientCommandDUnitTest { private void validateResults(boolean subscriptionEnabled) { CommandResult result = gfsh.executeCommand("list members"); -// list is always locator-0, server-1, server-2 -String server1 = result.getTableColumnValues("members", "Id").get(1); +Map> members = result.getMapFromTableContent("members"); +int server1Idx = members.get("Name").indexOf("server-1"); +String server1 = members.get("Id").get(server1Idx); result = gfsh.executeCommand("list clients"); String clientId = result.getColumnFromTableContent(CliStrings.LIST_CLIENT_COLUMN_Clients,
[geode] branch develop updated: Markdown format improvements.
This is an automated email from the ASF dual-hosted git repository. jbarrett pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 1c349b5 Markdown format improvements. 1c349b5 is described below commit 1c349b50ec74c32f482905ba68609ed2f639067b Author: Jacob Barrett AuthorDate: Tue Aug 28 18:15:23 2018 -0700 Markdown format improvements. --- BUILDING.md | 16 +- README.md | 99 + 2 files changed, 62 insertions(+), 53 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 308ef8a..1086bdd 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -10,12 +10,13 @@ Set the JAVA\_HOME environment variable. For example: | OSX | ``export JAVA_HOME=`/usr/libexec/java_home -v 1.8``| | Windows | ``set JAVA_HOME="C:\Program Files\Java\jdk1.8.0_121"`` | -Download the project source from the Releases page at [Apache Geode] -(http://geode.apache.org/releases/), and unpack the source code. +Download the project source from the Releases page at +[Apache Geode](http://geode.apache.org/releases/), and unpack the source code. Within the directory containing the unpacked source code, run the gradle build: - -$ ./gradlew build +```console +$ ./gradlew build +``` Once the build completes, the project files will be installed at `geode-assembly/build/install/apache-geode`. The distribution archives will be @@ -23,8 +24,9 @@ created in `geode-assembly/build/distributions/`. Verify the installation by invoking the `gfsh` shell command to print version information: - -$ ./geode-assembly/build/install/apache-geode/bin/gfsh version -v1.1.0 +```console +$ ./geode-assembly/build/install/apache-geode/bin/gfsh version +v1.1.0 +``` Note: on Windows invoke the `gfsh.bat` script to print the version string. diff --git a/README.md b/README.md index b9d94bd..54b9686 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ can load dependencies from [Maven Central](https://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.apache.geode%22). Maven -``` +```xml org.apache.geode @@ -57,7 +57,7 @@ Maven ``` Gradle -``` +```groovy dependencies { compile "org.apache.geode:geode-core:$VERSION" } @@ -117,69 +117,76 @@ instructions on how to build the project. Geode requires installation of JDK version 1.8. After installing Apache Geode, start a locator and server: - -$ gfsh -gfsh> start locator -gfsh> start server +```console +$ gfsh +gfsh> start locator +gfsh> start server +``` Create a region: - -gfsh> create region --name=hello --type=REPLICATE +```console +gfsh> create region --name=hello --type=REPLICATE +``` Write a client application (this example uses a [Gradle](https://gradle.org) build script): _build.gradle_ +```groovy +apply plugin: 'java' +apply plugin: 'application' -apply plugin: 'java' -apply plugin: 'application' - -mainClassName = 'HelloWorld' +mainClassName = 'HelloWorld' -repositories { mavenCentral() } -dependencies { - compile 'org.apache.geode:geode-core:1.4.0' - runtime 'org.slf4j:slf4j-log4j12:1.7.24' -} +repositories { mavenCentral() } +dependencies { + compile 'org.apache.geode:geode-core:1.4.0' + runtime 'org.slf4j:slf4j-log4j12:1.7.24' +} +``` _src/main/java/HelloWorld.java_ - -import java.util.Map; -import org.apache.geode.cache.Region; -import org.apache.geode.cache.client.*; - -public class HelloWorld { - public static void main(String[] args) throws Exception { -ClientCache cache = new ClientCacheFactory() - .addPoolLocator("localhost", 10334) - .create(); -Region region = cache - .createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY) - .create("hello"); - -region.put("1", "Hello"); -region.put("2", "World"); - -for (Map.Entry entry : region.entrySet()) { - System.out.format("key = %s, value = %s\n", entry.getKey(), entry.getValue()); -} -cache.close(); - } +```java +import java.util.Map; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.client.*; + +public class HelloWorld { + public static void main(String[] args) throws Exception { +ClientCache cache = new ClientCacheFactory() + .addPoolLocator("localhost", 10334) + .create(); +Region region = cache + .createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY) + .create("hello"); + +region.put("1", "Hello"); +region.put("2", "World"); + +for (Map.Entry entry : region.entrySet()) { + System.out.format("key = %s, value = %s\n", entry.getKey(), entry.getValue()); } +cache.close(); + } +} +``` Build and run the `HelloWorld` example: - -$ gradle run +```console +$ gradle run +``` The application will connect to the
[geode] branch feature/GEODE-5660 updated (5ccebd2 -> 4121388)
This is an automated email from the ASF dual-hosted git repository. udo pushed a change to branch feature/GEODE-5660 in repository https://gitbox.apache.org/repos/asf/geode.git. discard 5ccebd2 GEODE-5660: Added method to lookup war file from classpath within AgentUtil.java. This is to address problem where http server is started from Java API (Spring Data Geode specifically) Now, the application can reference the `geode-web-api` war from repo and not have to specifically set `GEODE-HOME` property new 4121388 GEODE-5660: Added method to lookup war file from classpath within AgentUtil.java. This is to address problem where http server is started from Java API (Spring Data Geode specifically) Now, the application can reference the `geode-web-api` war from repo and not have to specifically set `GEODE-HOME` property 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 (5ccebd2) \ N -- N -- N refs/heads/feature/GEODE-5660 (4121388) 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: .../java/org/apache/geode/management/internal/AgentUtilJUnitTest.java | 3 ++- .../src/main/java/org/apache/geode/management/internal/AgentUtil.java | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-)
[geode] 01/01: GEODE-5660: Added method to lookup war file from classpath within AgentUtil.java. This is to address problem where http server is started from Java API (Spring Data Geode specifically)
This is an automated email from the ASF dual-hosted git repository. udo pushed a commit to branch feature/GEODE-5660 in repository https://gitbox.apache.org/repos/asf/geode.git commit 4121388fb8a611f6303b621d12e1a267a303bc13 Author: Udo Kohlmeyer AuthorDate: Tue Aug 28 17:03:47 2018 -0700 GEODE-5660: Added method to lookup war file from classpath within AgentUtil.java. This is to address problem where http server is started from Java API (Spring Data Geode specifically) Now, the application can reference the `geode-web-api` war from repo and not have to specifically set `GEODE-HOME` property --- .../geode/management/internal/AgentUtilJUnitTest.java | 19 +++ .../apache/geode/management/internal/AgentUtil.java | 14 -- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/geode-assembly/src/integrationTest/java/org/apache/geode/management/internal/AgentUtilJUnitTest.java b/geode-assembly/src/integrationTest/java/org/apache/geode/management/internal/AgentUtilJUnitTest.java index 4d5b718..2bca797 100644 --- a/geode-assembly/src/integrationTest/java/org/apache/geode/management/internal/AgentUtilJUnitTest.java +++ b/geode-assembly/src/integrationTest/java/org/apache/geode/management/internal/AgentUtilJUnitTest.java @@ -14,10 +14,14 @@ */ package org.apache.geode.management.internal; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; import java.io.IOException; +import java.util.List; +import org.hamcrest.text.IsEqualIgnoringCase; import org.junit.Before; import org.junit.Rule; import org.junit.Test; @@ -50,4 +54,19 @@ public class AgentUtilJUnitTest { String gemFireWarLocation = agentUtil.findWarLocation("geode-pulse"); assertNotNull("Pulse WAR File was not found", gemFireWarLocation); } + + @Test + public void testLookupOfWarFileOnClassPath() { +String classpath = System.getProperty("java.class.path"); +List gemFireWarLocation = agentUtil.lookupWarLocationFromClasspath("geode-web-api"); +assertEquals(0, gemFireWarLocation.size()); + +classpath = +classpath + System.getProperty("path.separator") + "somelocation/geode-web-api.972347.war"; +System.setProperty("java.class.path", classpath); +gemFireWarLocation = agentUtil.lookupWarLocationFromClasspath("geode-web-api"); +assertEquals(1, gemFireWarLocation.size()); +assertThat(gemFireWarLocation.get(0), + IsEqualIgnoringCase.equalToIgnoringCase("somelocation/geode-web-api.972347.war")); + } } diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/AgentUtil.java b/geode-core/src/main/java/org/apache/geode/management/internal/AgentUtil.java index 95e40dc..f89c1bd 100755 --- a/geode-core/src/main/java/org/apache/geode/management/internal/AgentUtil.java +++ b/geode-core/src/main/java/org/apache/geode/management/internal/AgentUtil.java @@ -17,6 +17,9 @@ package org.apache.geode.management.internal; import java.io.File; import java.net.URL; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; import org.apache.commons.lang.StringUtils; import org.apache.logging.log4j.Logger; @@ -28,7 +31,6 @@ import org.apache.geode.internal.logging.LogService; * Hosts common utility methods needed by the management package * * @since Geode 1.0.0.0 - * */ public class AgentUtil { @@ -53,8 +55,9 @@ public class AgentUtil { *geode-web-api */ public String findWarLocation(String warFilePrefix) { +List classpathWarLocation = lookupWarLocationFromClasspath(warFilePrefix); String geodeHome = getGeodeHome(); -if (StringUtils.isNotBlank(geodeHome)) { +if (StringUtils.isNotBlank(geodeHome) || classpathWarLocation.size() > 0) { String[] possibleFiles = {geodeHome + "/tools/Extensions/" + warFilePrefix + "-" + gemfireVersion + ".war", geodeHome + "/tools/Pulse/" + warFilePrefix + "-" + gemfireVersion + ".war", @@ -91,6 +94,13 @@ public class AgentUtil { return null; } + public List lookupWarLocationFromClasspath(String warFilePrefix) { +return Arrays + .stream(System.getProperty("java.class.path").split(System.getProperty("path.separator"))) +.filter(s -> s.contains(warFilePrefix)).collect( +Collectors.toList()); + } + public boolean isWebApplicationAvailable(final String warFileLocation) { return StringUtils.isNotBlank(warFileLocation); }
[geode-native] branch develop updated: GEODE-5648: Native client user guide - add a page describing Continuous Queries (#340)
This is an automated email from the ASF dual-hosted git repository. dbarnes pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new 232e5ca GEODE-5648: Native client user guide - add a page describing Continuous Queries (#340) 232e5ca is described below commit 232e5caf4913dd0e33a59124bfea267327513ae4 Author: Dave Barnes AuthorDate: Tue Aug 28 16:37:31 2018 -0700 GEODE-5648: Native client user guide - add a page describing Continuous Queries (#340) --- .../source/subnavs/geode-nc-nav.erb| 14 +-- .../about-client-users-guide.html.md.erb | 2 +- .../registering-interest-for-entries.html.md.erb | 110 + .../continuous-queries.html.md.erb | 54 ++ .../getting-started-nc-client.html.md.erb | 2 +- 5 files changed, 171 insertions(+), 11 deletions(-) diff --git a/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb b/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb index c83b9a6..7b8acef 100644 --- a/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb +++ b/docs/geode-native-book/master_middleman/source/subnavs/geode-nc-nav.erb @@ -67,16 +67,12 @@ limitations under the License. - + Remote Queries - - -Remote Query Basics - - -Remote Query API - - + + + + Continuous Queries diff --git a/docs/geode-native-docs/about-client-users-guide.html.md.erb b/docs/geode-native-docs/about-client-users-guide.html.md.erb index 43e0084..6ac7512 100644 --- a/docs/geode-native-docs/about-client-users-guide.html.md.erb +++ b/docs/geode-native-docs/about-client-users-guide.html.md.erb @@ -17,7 +17,7 @@ See the License for the specific language governing permissions and limitations under the License. --> -Published August 10, 2018 +Published August 27, 2018 This documentation describes the <%=vars.product_name_long%> Native Client. diff --git a/docs/geode-native-docs/client-cache/registering-interest-for-entries.html.md.erb b/docs/geode-native-docs/client-cache/registering-interest-for-entries.html.md.erb new file mode 100644 index 000..dfc570b --- /dev/null +++ b/docs/geode-native-docs/client-cache/registering-interest-for-entries.html.md.erb @@ -0,0 +1,110 @@ +--- +title: Registering Interest for Entries +--- + + + +For client regions, you can programmatically register interest in entry keys stored on a cache server region. A client region receives update notifications from the cache server for the keys of interest. + +You can register interest for specific entry keys or for all keys. Regular expressions can be used to register interest for keys whose strings match the expression. You can also unregister interest for specific keys, groups of keys based on regular expressions, or for all keys. + +**Note:** Interest registration and unregistration are symmetrical operations. Consequently, you cannot register interest in all keys and then unregister interest in a specific set of keys. Also, if you first register interest in specific keys with `registerKeys`, then call `registerAllKeys`, you must call `unregisterAllKeys` before specifying interest in specific keys again. + + +## Client API for Registering Interest + +You register client interest through the C++ or NET API. The C++ API provides the `registerKeys`, `registerAllKeys`, and `registerRegex` methods, with corresponding unregistration accomplished using the `unregisterKeys`, `unregisterAllKeys`, and `unregisterRegex` methods. The .NET API provides the `RegisterKeys`, `RegisterAllKeys`, and `RegisterRegex` methods, with corresponding unregistration accomplished using the `UnregisterKeys`, `UnregisterAllKeys`, and `UnregisterRegex` methods. + +The `registerKeys`, `registerRegex` and `registerAllKeys` methods have the option to populate the cache with the registration results from the server. The `registerRegex` and `registerAllKeys` methods can also optionally return the current list of keys registered on the server. + +## Setting Up Client Notification + +In addition to the programmatic function calls, to register interest for a server region and receive updated entries you need to configure the region with the `PROXY` or `CACHING_PROXY RegionShortcut` setting. The region's pool should have `subscription-enabled=true` set either in the client XML or programmatically via a `CacheFactory::setSubscriptionEnabled(true)` API call. Otherwise, when you register interest, you will get an `UnsupportedOperationException`. + +``` pre + + ... +``` + +All clients that have subscriptions enabled track and drop (ignore) any duplicate notifications received. To reduce resource usage, a client expires tracked sources for which new
[geode] branch develop updated: GEODE-5637: disable SingleHopClientExecutorWithLoggingIntegrationTest
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 The following commit(s) were added to refs/heads/develop by this push: new 34ec001 GEODE-5637: disable SingleHopClientExecutorWithLoggingIntegrationTest 34ec001 is described below commit 34ec00147c01b043ebc5094e6e699469756245b4 Author: Kirk Lund AuthorDate: Tue Aug 28 16:21:54 2018 -0700 GEODE-5637: disable SingleHopClientExecutorWithLoggingIntegrationTest This test is super flaky and seems to consistently fail on Windows. It's trying to use SystemErrRule to test logging which doesn't really work very well. I think the test needs to be rewritten with a Log4J2 Appender instead of trying to use stdout or stderr. I'm going to disable it with Ignore until I can get this rewritten. Discussed with and reviewed by Sai. --- .../internal/SingleHopClientExecutorWithLoggingIntegrationTest.java | 6 ++ 1 file changed, 6 insertions(+) diff --git a/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/SingleHopClientExecutorWithLoggingIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/SingleHopClientExecutorWithLoggingIntegrationTest.java index 0967a70..48aa2ae 100644 --- a/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/SingleHopClientExecutorWithLoggingIntegrationTest.java +++ b/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/SingleHopClientExecutorWithLoggingIntegrationTest.java @@ -20,9 +20,11 @@ import static java.util.concurrent.TimeUnit.MINUTES; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; +import org.junit.Ignore; 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.apache.geode.test.junit.categories.ClientServerTest; @@ -37,11 +39,15 @@ public class SingleHopClientExecutorWithLoggingIntegrationTest { @Rule public SystemErrRule systemErrRule = new SystemErrRule().enableLog(); + @Rule + public SystemOutRule systemOutRule = new SystemOutRule().enableLog(); + /** * Refer: GEODE-2109 This test verifies that any exception thrown from forked thread is logged * into log. */ @Test + @Ignore("Until GEODE-5637 is fixed") public void submittedTaskShouldLogFailure() { String message = "I am expecting this to be logged";
[geode] branch develop updated (ebe44c2 -> 281492a)
This is an automated email from the ASF dual-hosted git repository. klund pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from ebe44c2 GEODE-5641: add no-arg constructor to DiskDirRule new f550cc4 GEODE-5639: use AssertJ instead of CatchException new 281492a GEODE-5639: remove CatchException dependencies from Gradle The 2 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: .../connectors/jdbc/JdbcWriterIntegrationTest.java | 9 +- ...okenSerializationConsistencyRegressionTest.java | 12 +- ...ExceptionsIncludeLocalMemberRegressionTest.java | 54 +--- .../cache/execute/PRTransactionDUnitTest.java | 152 - .../geode/pdx/PdxAttributesDistributedTest.java} | 88 +--- .../test/dunit/tests/BasicDistributedTest.java | 73 +- .../LocatorLauncherIntegrationTest.java| 53 +++ .../ServerLauncherBuilderIntegrationTest.java | 30 ++-- .../distributed/ServerLauncherIntegrationTest.java | 53 +++ .../eviction/TransactionsWithOverflowTest.java | 43 +++--- .../FileProcessControllerIntegrationTest.java | 7 +- .../pdx/PdxInstanceLoaderIntegrationTest.java | 30 ++-- .../apache/geode/distributed/LocatorStateTest.java | 34 ++--- .../cache/EntryEventSerializationTest.java | 6 +- .../cache/xmlcache/CacheCreationJUnitTest.java | 15 +- .../geode/internal/lang/ThrowableUtilsTest.java| 64 - .../internal/offheap/FreeListManagerTest.java | 41 +++--- .../MemoryAllocatorFillPatternJUnitTest.java | 25 ++-- .../security/GemFireSecurityExceptionTest.java | 91 ++-- .../geode/security/NotAuthorizedExceptionTest.java | 97 ++--- geode-dunit/build.gradle | 3 - .../ParallelGatewaySenderOperationsDUnitTest.java | 11 +- gradle/dependency-versions.properties | 2 - gradle/test.gradle | 2 - 24 files changed, 481 insertions(+), 514 deletions(-) rename geode-core/src/{integrationTest/java/org/apache/geode/pdx/PdxAttributesJUnitTest.java => distributedTest/java/org/apache/geode/pdx/PdxAttributesDistributedTest.java} (81%)
[geode] 01/02: GEODE-5639: use AssertJ instead of CatchException
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 f550cc48b15ccca2f4c91891b93adb16a044af06 Author: Kirk Lund AuthorDate: Mon Aug 27 11:47:47 2018 -0700 GEODE-5639: use AssertJ instead of CatchException * Move PdxAttributesJUnitTest to distributedTest --- .../connectors/jdbc/JdbcWriterIntegrationTest.java | 9 +- ...okenSerializationConsistencyRegressionTest.java | 12 +- ...ExceptionsIncludeLocalMemberRegressionTest.java | 54 +--- .../cache/execute/PRTransactionDUnitTest.java | 152 - .../geode/pdx/PdxAttributesDistributedTest.java} | 88 +--- .../test/dunit/tests/BasicDistributedTest.java | 73 +- .../LocatorLauncherIntegrationTest.java| 53 +++ .../ServerLauncherBuilderIntegrationTest.java | 30 ++-- .../distributed/ServerLauncherIntegrationTest.java | 53 +++ .../eviction/TransactionsWithOverflowTest.java | 43 +++--- .../FileProcessControllerIntegrationTest.java | 7 +- .../pdx/PdxInstanceLoaderIntegrationTest.java | 30 ++-- .../apache/geode/distributed/LocatorStateTest.java | 34 ++--- .../cache/EntryEventSerializationTest.java | 6 +- .../cache/xmlcache/CacheCreationJUnitTest.java | 15 +- .../geode/internal/lang/ThrowableUtilsTest.java| 64 - .../internal/offheap/FreeListManagerTest.java | 41 +++--- .../MemoryAllocatorFillPatternJUnitTest.java | 25 ++-- .../security/GemFireSecurityExceptionTest.java | 91 ++-- .../geode/security/NotAuthorizedExceptionTest.java | 97 ++--- .../ParallelGatewaySenderOperationsDUnitTest.java | 11 +- 21 files changed, 481 insertions(+), 507 deletions(-) diff --git a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java index 404d7c2..6f126be 100644 --- a/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java +++ b/geode-connectors/src/acceptanceTest/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java @@ -14,9 +14,8 @@ */ package org.apache.geode.connectors.jdbc; -import static com.googlecode.catchexception.CatchException.catchException; -import static com.googlecode.catchexception.CatchException.caughtException; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.catchThrowable; import java.sql.Connection; import java.sql.ResultSet; @@ -58,7 +57,7 @@ public abstract class JdbcWriterIntegrationTest { private Employee employee2; @Before - public void setup() throws Exception { + public void setUp() throws Exception { cache = (InternalCache) new CacheFactory().set("locators", "").set("mcast-port", "0") .setPdxReadSerialized(false).create(); employees = createRegionWithJDBCSynchronousWriter(REGION_TABLE_NAME); @@ -138,8 +137,8 @@ public abstract class JdbcWriterIntegrationTest { @Test public void putNonPdxInstanceFails() { Region nonPdxEmployees = this.employees; -catchException(nonPdxEmployees).put("1", "non pdx instance"); -assertThat((Exception) caughtException()).isInstanceOf(IllegalArgumentException.class); +Throwable thrown = catchThrowable(() -> nonPdxEmployees.put("1", "non pdx instance")); +assertThat(thrown).isInstanceOf(IllegalArgumentException.class); } @Test diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/BrokenSerializationConsistencyRegressionTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/BrokenSerializationConsistencyRegressionTest.java index da6365b..be39bbd 100644 --- a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/BrokenSerializationConsistencyRegressionTest.java +++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/BrokenSerializationConsistencyRegressionTest.java @@ -14,13 +14,12 @@ */ package org.apache.geode.internal.cache; -import static com.googlecode.catchexception.CatchException.catchException; -import static com.googlecode.catchexception.CatchException.caughtException; import static org.apache.geode.cache.RegionShortcut.REPLICATE; import static org.apache.geode.internal.lang.SystemPropertyHelper.EARLY_ENTRY_EVENT_SERIALIZATION; import static org.apache.geode.internal.lang.SystemPropertyHelper.GEODE_PREFIX; import static org.apache.geode.test.dunit.VM.getVM; import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.catchThrowable; import java.io.DataInput; import java.io.DataOutput; @@ -109,9 +108,8 @@ public class BrokenSerializationConsistencyRegressionTest implements Serializabl @Test public void
[geode] 02/02: GEODE-5639: remove CatchException dependencies from Gradle
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 281492aed8c290eff9bf83917439ded02bffef36 Author: Kirk Lund AuthorDate: Mon Aug 27 12:02:38 2018 -0700 GEODE-5639: remove CatchException dependencies from Gradle --- geode-dunit/build.gradle | 3 --- gradle/dependency-versions.properties | 2 -- gradle/test.gradle| 2 -- 3 files changed, 7 deletions(-) diff --git a/geode-dunit/build.gradle b/geode-dunit/build.gradle index c89be8c..7ed3bd5 100755 --- a/geode-dunit/build.gradle +++ b/geode-dunit/build.gradle @@ -45,9 +45,6 @@ dependencies { compile 'org.mockito:mockito-core:' + project.'mockito-core.version' compile 'org.awaitility:awaitility:' + project.'awaitility.version' - compile 'eu.codearte.catch-exception:catch-exception:' + project.'catch-exception.version' - compile 'eu.codearte.catch-exception:catch-throwable:' + project.'catch-throwable.version' - compile('junit:junit:' + project.'junit.version') { exclude module: 'hamcrest-core' } diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties index d9177b9..ab46bc0 100644 --- a/gradle/dependency-versions.properties +++ b/gradle/dependency-versions.properties @@ -19,8 +19,6 @@ assertj-core.version = 3.10.0 awaitility.version = 3.1.1 bcel.version = 6.2 bounty-castle.version = 1.59 -catch-exception.version = 1.4.4 -catch-throwable.version = 1.4.4 cglib.version = 3.2.7 classgraph.version = 4.0.6 commons-beanutils.version = 1.9.3 diff --git a/gradle/test.gradle b/gradle/test.gradle index e12b66b..1a70659 100644 --- a/gradle/test.gradle +++ b/gradle/test.gradle @@ -42,8 +42,6 @@ subprojects { testCompile 'com.google.code.tempus-fugit:tempus-fugit:' + project.'tempus-fugit.version' testCompile 'org.awaitility:awaitility:' + project.'awaitility.version' testCompile 'edu.umd.cs.mtc:multithreadedtc:' + project.'multithreadedtc.version' -testCompile 'eu.codearte.catch-exception:catch-exception:' + project.'catch-exception.version' -testCompile 'eu.codearte.catch-exception:catch-throwable:' + project.'catch-throwable.version' testCompile 'junit:junit:' + project.'junit.version' testCompile 'org.assertj:assertj-core:' + project.'assertj-core.version' testCompile 'org.hamcrest:hamcrest-all:' + project.'hamcrest-all.version'
[geode] branch concourse-staging updated (16496e9 -> debcd83)
This is an automated email from the ASF dual-hosted git repository. upthewaterspout pushed a change to branch concourse-staging in repository https://gitbox.apache.org/repos/asf/geode.git. discard 16496e9 Limit max number of simultaneous runs to 5. add 76af1dd GEODE-5597 Publish geode artifacts to maven repo on GCS (#2347) add 48fe306 GEODE-5642 remove gradle task :cleanAll (#2385) add 3651a9a GEODE-5646 Client throws ToDataException when locator is shutting down add 60ea939 GEODE-5618: Auth Attributes in FunctionService (#2360) add 58e4035 GEODE-5608 truncate fork/branch names in image/instance naming (#2363) add 366594c Revert "GEODE-5608 truncate fork/branch names in image/instance naming (#2363)" add aa915c2 GEODE-5608 truncate fork/branch names in image/instance naming (#2390) add fd29e62 GEODE-5594: Enable endpoint identification during using SSL handshake. (#2346) add 926f35e Feature/geode 5624 Use a single thread to ensure beforeCompletion and afterCompletion are executed by the same thread. (#2388) add 8382f8c GEODE-5650: Improve ClusterStartupRule tear down (#2392) add b66beba GEODE-5637: move SingleHopClientExecutorSubmitTaskWithExceptionTest to integrationTest add 7b6f5fa GEODE-5633 pr pipeline name has fork and branch (#2391) add b3cf86b GEODE-5604 Update gradle syntax to comply with 5.0 (#2350) add ebe44c2 GEODE-5641: add no-arg constructor to DiskDirRule new debcd83 Limit max number of simultaneous runs to 5. 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 (16496e9) \ N -- N -- N refs/heads/concourse-staging (debcd83) 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: build.gradle | 16 +- buildSrc/build.gradle | 10 +- ci/images/google-geode-builder/build_image.sh | 9 +- ci/pipelines/README.md | 2 +- ci/pipelines/clean_fork_pipelines.sh | 18 +- ci/pipelines/deploy_meta.sh| 15 +- ci/pipelines/examples/deploy_pipeline.sh | 22 +- ci/pipelines/geode-build/deploy_pipeline.sh| 18 +- ci/pipelines/geode-build/jinja.template.yml| 39 ++- ci/pipelines/images/deploy_images_pipeline.sh | 10 +- ci/pipelines/meta.yml | 3 + ci/pipelines/pull-request/deploy_pr_pipeline.sh| 26 +- ci/pipelines/render.py | 39 ++- ci/pipelines/shared/shared_jinja.yml | 2 +- .../files/out => pipelines/shared/utilities.sh}| 15 +- ci/scripts/publish.sh | 96 +++ ci/scripts/start_instance.sh | 12 +- extensions/geode-modules-assembly/build.gradle | 40 ++- .../geode-modules-session-internal/build.gradle| 2 +- extensions/geode-modules-session/build.gradle | 2 +- extensions/geode-modules-test/build.gradle | 2 +- extensions/geode-modules-tomcat7/build.gradle | 4 +- extensions/geode-modules-tomcat8/build.gradle | 4 +- extensions/geode-modules/build.gradle | 2 +- geode-assembly/build.gradle| 74 ++--- geode-assembly/geode-assembly-test/build.gradle| 2 +- .../integrationTest/resources/assembly_content.txt | 6 + geode-connectors/build.gradle | 2 +- geode-core/build.gradle| 21 +- ...tServerHostNameVerificationDistributedTest.java | 228 +++ ...UserAuthenticationFunctionServiceDUnitTest.java | 183 .../ClientServerJTAFailoverDistributedTest.java| 37 ++- .../GfshHostNameVerificationDistributedTest.java | 191 + .../AutoConnectionSourceImplJUnitTest.java | 24 ++ ...opClientExecutorWithLoggingIntegrationTest.java | 60 .../tcpserver/TCPClientSSLIntegrationTest.java | 175 .../client/internal/AutoConnectionSourceImpl.java | 16 +- .../geode/distributed/ConfigurationProperties.java | 11 + .../internal/AbstractDistributionConfig.java | 4 + .../distributed/internal/DistributionConfig.java | 28
[geode] 01/01: Limit max number of simultaneous runs to 5.
This is an automated email from the ASF dual-hosted git repository. upthewaterspout pushed a commit to branch concourse-staging in repository https://gitbox.apache.org/repos/asf/geode.git commit debcd83e374104c9e37c410fcb59075d44f0c14a Author: Mark Hanson AuthorDate: Fri Jul 27 11:29:38 2018 -0700 Limit max number of simultaneous runs to 5. --- ci/pipelines/geode-build/jinja.template.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/pipelines/geode-build/jinja.template.yml b/ci/pipelines/geode-build/jinja.template.yml index c15fad0..749016a 100644 --- a/ci/pipelines/geode-build/jinja.template.yml +++ b/ci/pipelines/geode-build/jinja.template.yml @@ -235,6 +235,7 @@ jobs: {% for test in tests if not test.name=="StressNew" %} - name: {{test.name}}Test public: true + max_in_flight: 5 plan: - do: {{ plan_resource_gets() |indent(4) }}
[geode] branch develop updated: GEODE-5641: add no-arg constructor to DiskDirRule
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 The following commit(s) were added to refs/heads/develop by this push: new ebe44c2 GEODE-5641: add no-arg constructor to DiskDirRule ebe44c2 is described below commit ebe44c22d30774a916beca33c2316289a44ca3c5 Author: Kirk Lund AuthorDate: Mon Aug 27 10:31:22 2018 -0700 GEODE-5641: add no-arg constructor to DiskDirRule To redirect default disk store to a TemporaryFolder, you can simply add this to any test: @Rule public DiskDirRule diskDirRule = new DiskDirRule(); Or in a DistributedTest use: @Rule public DistributedDiskDirRule diskDirRule = new DistributedDiskDirRule(); --- .../test/dunit/rules/DistributedDiskDirRule.java | 29 +- .../apache/geode/test/junit/rules/DiskDirRule.java | 23 + 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/DistributedDiskDirRule.java b/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/DistributedDiskDirRule.java index 3425fdd..f4cbd03 100644 --- a/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/DistributedDiskDirRule.java +++ b/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/DistributedDiskDirRule.java @@ -109,13 +109,19 @@ public class DistributedDiskDirRule extends DiskDirRule implements SerializableT } public DistributedDiskDirRule(Builder builder) { -this(builder.fillIn(), new RemoteInvoker()); +this(builder, new RemoteInvoker()); } protected DistributedDiskDirRule(Builder builder, RemoteInvoker invoker) { -super(builder.initializeHelperRules, null, null); -temporaryFolder = builder.temporaryFolder; -testName = builder.testName; +this(builder.initializeHelperRules, builder.temporaryFolder, builder.testName, invoker); + } + + protected DistributedDiskDirRule(boolean initializeHelperRules, + SerializableTemporaryFolder temporaryFolder, SerializableTestName testName, + RemoteInvoker invoker) { +super(initializeHelperRules, null, null); +this.temporaryFolder = temporaryFolder; +this.testName = testName; this.invoker = invoker; } @@ -236,8 +242,8 @@ public class DistributedDiskDirRule extends DiskDirRule implements SerializableT */ public static class Builder { private boolean initializeHelperRules = true; -private SerializableTemporaryFolder temporaryFolder; -private SerializableTestName testName; +private SerializableTemporaryFolder temporaryFolder = new SerializableTemporaryFolder(); +private SerializableTestName testName = new SerializableTestName(); public Builder() { // nothing @@ -264,18 +270,7 @@ public class DistributedDiskDirRule extends DiskDirRule implements SerializableT } public DistributedDiskDirRule build() { - fillIn(); return new DistributedDiskDirRule(this); } - -private Builder fillIn() { - if (temporaryFolder == null) { -temporaryFolder = new SerializableTemporaryFolder(); - } - if (testName == null) { -testName = new SerializableTestName(); - } - return this; -} } } diff --git a/geode-dunit/src/main/java/org/apache/geode/test/junit/rules/DiskDirRule.java b/geode-dunit/src/main/java/org/apache/geode/test/junit/rules/DiskDirRule.java index bbeec89..85951ef 100644 --- a/geode-dunit/src/main/java/org/apache/geode/test/junit/rules/DiskDirRule.java +++ b/geode-dunit/src/main/java/org/apache/geode/test/junit/rules/DiskDirRule.java @@ -43,6 +43,10 @@ public class DiskDirRule extends DescribedExternalResource { private String originalValue; + public DiskDirRule() { +this(new Builder()); + } + public DiskDirRule(TemporaryFolder temporaryFolder) { this(new Builder().temporaryFolder(temporaryFolder)); } @@ -59,10 +63,6 @@ public class DiskDirRule extends DescribedExternalResource { this(builder.initializeHelperRules, builder.temporaryFolder, builder.testName); } - protected DiskDirRule() { -this(false, null, null); - } - protected DiskDirRule(boolean initializeHelperRules, TemporaryFolder temporaryFolder, TestName testName) { this.initializeHelperRules = initializeHelperRules; @@ -143,8 +143,8 @@ public class DiskDirRule extends DescribedExternalResource { */ public static class Builder { private boolean initializeHelperRules = true; -private TemporaryFolder temporaryFolder; -private TestName testName; +private TemporaryFolder temporaryFolder = new TemporaryFolder(); +private TestName testName = new TestName(); public Builder() { // nothing @@ -171,18 +171,7 @@ public class DiskDirRule extends DescribedExternalResource { } public DiskDirRule build() { - fillIn();
[geode] branch develop updated: GEODE-5604 Update gradle syntax to comply with 5.0 (#2350)
This is an automated email from the ASF dual-hosted git repository. jbarrett pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new b3cf86b GEODE-5604 Update gradle syntax to comply with 5.0 (#2350) b3cf86b is described below commit b3cf86b7f8b0e27abe9ffc4cdb0fd18b7df0c3e2 Author: Robert Houghton AuthorDate: Tue Aug 28 14:58:21 2018 -0700 GEODE-5604 Update gradle syntax to comply with 5.0 (#2350) * Fix subproject names for gradle 5.0 ** stop using '/' and use preferred ':' character for nested projects * Update performance profiling plug-in to be Gradle 5.0 compliant * Fix input/output warnings on geode-old-versions * Don't use custom configuration in geode-modules-assembly * All test configurations inherit annotationProcessor from mainSourceSet * Using strict maven-publish plugin Co-authored-by: Dick Cavender Co-authored-by: Jacob Barrett Co-authored-by: Patrick Rhomberg Co-authored-by: Robert Houghton --- build.gradle | 4 +- buildSrc/build.gradle | 10 ++- extensions/geode-modules-assembly/build.gradle | 40 -- .../geode-modules-session-internal/build.gradle| 2 +- extensions/geode-modules-session/build.gradle | 2 +- extensions/geode-modules-test/build.gradle | 2 +- extensions/geode-modules-tomcat7/build.gradle | 4 +- extensions/geode-modules-tomcat8/build.gradle | 4 +- extensions/geode-modules/build.gradle | 2 +- geode-assembly/build.gradle| 29 +++ geode-assembly/geode-assembly-test/build.gradle| 2 +- geode-connectors/build.gradle | 2 +- geode-core/build.gradle| 7 +- geode-cq/build.gradle | 1 + geode-lucene/build.gradle | 8 +- geode-old-client-support/build.gradle | 2 +- geode-old-versions/build.gradle| 4 +- geode-protobuf/build.gradle| 7 +- geode-pulse/build.gradle | 4 +- geode-web-api/build.gradle | 1 + gradle/ide.gradle | 16 ++-- gradle/java.gradle | 8 ++ gradle/publish.gradle | 90 +++--- gradle/sonar.gradle| 8 +- gradle/test.gradle | 28 +-- settings.gradle| 29 --- 26 files changed, 176 insertions(+), 140 deletions(-) diff --git a/build.gradle b/build.gradle index 3539e79..5e94551 100755 --- a/build.gradle +++ b/build.gradle @@ -28,7 +28,7 @@ buildscript { classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1' classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2' classpath "com.diffplug.spotless:spotless-plugin-gradle:3.10.0" -classpath "me.champeau.gradle:jmh-gradle-plugin:0.3.1" +classpath "me.champeau.gradle:jmh-gradle-plugin:0.4.7" classpath "com.pedjak.gradle.plugins:dockerized-test:0.5.6.2-SNAPSHOT" classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0' classpath "com.netflix.nebula:nebula-project-plugin:4.0.1" @@ -76,13 +76,13 @@ if (name == 'geode') { // utilities.gradle MUST be read before publish.gradle for reasons apply from: "${scriptDir}/utilities.gradle" apply from: "${scriptDir}/java.gradle" +apply from: "${scriptDir}/ide.gradle" apply from: "${scriptDir}/dependency-resolution.gradle" apply from: "${scriptDir}/test.gradle" apply from: "${scriptDir}/test-by-category.gradle" apply from: "${scriptDir}/publish.gradle" apply from: "${scriptDir}/code-analysis.gradle" apply from: "${scriptDir}/sonar.gradle" -apply from: "${scriptDir}/ide.gradle" apply from: "${scriptDir}/rat.gradle" apply from: "${scriptDir}/docker.gradle" apply from: "${scriptDir}/spotless.gradle" diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 21cf963..31959ae 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -21,7 +21,13 @@ repositories { } dependencies { - compile group: 'org.apache.geode', name: 'geode-junit', version: '1.3.0' + compile (group: 'org.apache.geode', name: 'geode-junit', version: '1.3.0') { +exclude group: 'org.apache.logging.log4j' + } + compile group: 'junit', name: 'junit', version: '4.12' compile files("${System.getProperty('java.home')}/../lib/tools.jar") -} \ No newline at end of file + + testAnnotationProcessor this.project + +} diff --git a/extensions/geode-modules-assembly/build.gradle b/extensions/geode-modules-assembly/build.gradle index 10a427a..0952c93 100644 --- a/extensions/geode-modules-assembly/build.gradle +++ b/extensions/geode-modules-assembly/build.gradle @@ -19,7
[geode] branch develop updated: GEODE-5633 pr pipeline name has fork and branch (#2391)
This is an automated email from the ASF dual-hosted git repository. jbarrett pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 7b6f5fa GEODE-5633 pr pipeline name has fork and branch (#2391) 7b6f5fa is described below commit 7b6f5fa0ca05fa21a713070fc8ad87badd3e4684 Author: FSOUTHERLAND <39743785+fsoutherl...@users.noreply.github.com> AuthorDate: Tue Aug 28 13:56:03 2018 -0700 GEODE-5633 pr pipeline name has fork and branch (#2391) Authored-by: Finn Southerland --- ci/pipelines/pull-request/deploy_pr_pipeline.sh | 8 ci/pipelines/shared/utilities.sh| 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ci/pipelines/pull-request/deploy_pr_pipeline.sh b/ci/pipelines/pull-request/deploy_pr_pipeline.sh index 78c5e78..eefa636 100755 --- a/ci/pipelines/pull-request/deploy_pr_pipeline.sh +++ b/ci/pipelines/pull-request/deploy_pr_pipeline.sh @@ -67,11 +67,11 @@ TARGET="geode" TEAM=${CONCOURSE_TEAM:-main} if [[ "${SANITIZED_GEODE_FORK}" == "apache" ]]; then - PIPELINE_PREFIX="" + PIPELINE_NAME="pr-${SANITIZED_GEODE_BRANCH}" DOCKER_IMAGE_PREFIX="" else - PIPELINE_PREFIX="${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-" - DOCKER_IMAGE_PREFIX=${PIPELINE_PREFIX} + PIPELINE_NAME="pr-${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}" + DOCKER_IMAGE_PREFIX="${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-" fi pushd ${SCRIPTDIR} 2>&1 > /dev/null @@ -86,7 +86,7 @@ pushd ${SCRIPTDIR} 2>&1 > /dev/null fly -t ${TARGET} set-pipeline \ --non-interactive \ ---pipeline pr-${SANITIZED_GEODE_BRANCH} \ +--pipeline ${PIPELINE_NAME} \ --config ${SCRIPTDIR}/generated-pipeline.yml \ --var docker-image-prefix=${DOCKER_IMAGE_PREFIX} \ --var concourse-team=${TEAM} diff --git a/ci/pipelines/shared/utilities.sh b/ci/pipelines/shared/utilities.sh index eef105f..4365908 100644 --- a/ci/pipelines/shared/utilities.sh +++ b/ci/pipelines/shared/utilities.sh @@ -16,8 +16,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -#!/usr/bin/env bash - getSanitizedBranch () { echo ${1} | tr "/" "-" | tr '[:upper:]' '[:lower:]' | cut -c 1-20 @@ -26,4 +24,3 @@ getSanitizedBranch () { getSanitizedFork () { echo ${1} | tr "/" "-" | tr '[:upper:]' '[:lower:]' | cut -c 1-16 } -
[geode] branch feature/GEODE-5338 updated: fix failing unit test
This is an automated email from the ASF dual-hosted git repository. sai_boorlagadda pushed a commit to branch feature/GEODE-5338 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-5338 by this push: new 8ddd87b fix failing unit test 8ddd87b is described below commit 8ddd87b177ae01daaa7bd72543760d6094f9bcc2 Author: Sai Boorlagadda AuthorDate: Tue Aug 28 13:07:53 2018 -0700 fix failing unit test --- .../geode/distributed/internal/DistributionConfigJUnitTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionConfigJUnitTest.java index 80154a2..69557e7 100644 --- a/geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionConfigJUnitTest.java +++ b/geode-core/src/test/java/org/apache/geode/distributed/internal/DistributionConfigJUnitTest.java @@ -100,7 +100,7 @@ public class DistributionConfigJUnitTest { @Test public void testGetAttributeNames() { String[] attNames = AbstractDistributionConfig._getAttNames(); -assertEquals(attNames.length, 163); +assertThat(attNames.length).isEqualTo(164); List boolList = new ArrayList(); List intList = new ArrayList(); @@ -134,7 +134,7 @@ public class DistributionConfigJUnitTest { // TODO - This makes no sense. One has no idea what the correct expected number of attributes // are. -assertEquals(32, boolList.size()); +assertEquals(33, boolList.size()); assertEquals(35, intList.size()); assertEquals(87, stringList.size()); assertEquals(5, fileList.size());
[geode] branch develop updated: GEODE-5637: move SingleHopClientExecutorSubmitTaskWithExceptionTest to integrationTest
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 The following commit(s) were added to refs/heads/develop by this push: new b66beba GEODE-5637: move SingleHopClientExecutorSubmitTaskWithExceptionTest to integrationTest b66beba is described below commit b66beba19c8457eaa684a3d03100c2755c68aab0 Author: Kirk Lund AuthorDate: Mon Aug 27 09:55:40 2018 -0700 GEODE-5637: move SingleHopClientExecutorSubmitTaskWithExceptionTest to integrationTest * Increase Awaitility timeout due to flaky failure * Cleanup test and use AssertJ --- ...opClientExecutorWithLoggingIntegrationTest.java | 60 ++ ...pClientExecutorSubmitTaskWithExceptionTest.java | 60 -- 2 files changed, 60 insertions(+), 60 deletions(-) diff --git a/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/SingleHopClientExecutorWithLoggingIntegrationTest.java b/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/SingleHopClientExecutorWithLoggingIntegrationTest.java new file mode 100644 index 000..0967a70 --- /dev/null +++ b/geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/SingleHopClientExecutorWithLoggingIntegrationTest.java @@ -0,0 +1,60 @@ +/* + * 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.client.internal; + +import static java.util.concurrent.TimeUnit.MINUTES; +import static org.assertj.core.api.Assertions.assertThat; +import static org.awaitility.Awaitility.await; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.contrib.java.lang.system.SystemErrRule; +import org.junit.experimental.categories.Category; + +import org.apache.geode.test.junit.categories.ClientServerTest; + +/** + * Test if exceptions are logged when thread is submitted using + * {@code SingleHopClientExecutor#submitTask} method. + */ +@Category(ClientServerTest.class) +public class SingleHopClientExecutorWithLoggingIntegrationTest { + + @Rule + public SystemErrRule systemErrRule = new SystemErrRule().enableLog(); + + /** + * Refer: GEODE-2109 This test verifies that any exception thrown from forked thread is logged + * into log. + */ + @Test + public void submittedTaskShouldLogFailure() { +String message = "I am expecting this to be logged"; + +SingleHopClientExecutor.submitTask(() -> { + // test piece throwing exception + throw new RuntimeException(message); +}); + +/* + * Sometimes need to wait for more than sec as thread execution takes time. + */ +await().atMost(2, MINUTES) +.untilAsserted(() -> assertThat(systemErrRule.getLog()).contains(message)); + } + +} diff --git a/geode-core/src/test/java/org/apache/geode/cache/client/internal/SingleHopClientExecutorSubmitTaskWithExceptionTest.java b/geode-core/src/test/java/org/apache/geode/cache/client/internal/SingleHopClientExecutorSubmitTaskWithExceptionTest.java deleted file mode 100644 index e8e4e02..000 --- a/geode-core/src/test/java/org/apache/geode/cache/client/internal/SingleHopClientExecutorSubmitTaskWithExceptionTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.client.internal; - -import static java.util.concurrent.TimeUnit.MINUTES; - -import org.awaitility.Awaitility; -import
[geode] branch develop updated: GEODE-5650: Improve ClusterStartupRule tear down (#2392)
This is an automated email from the ASF dual-hosted git repository. sai_boorlagadda pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 8382f8c GEODE-5650: Improve ClusterStartupRule tear down (#2392) 8382f8c is described below commit 8382f8cff8120076fa9af7816e8454575c3a189c Author: Sai Boorlagadda AuthorDate: Tue Aug 28 12:53:00 2018 -0700 GEODE-5650: Improve ClusterStartupRule tear down (#2392) --- .../geode/test/dunit/rules/ClusterStartupRule.java | 44 +++--- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java b/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java index de71e7b..d4f434e 100644 --- a/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java +++ b/geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/ClusterStartupRule.java @@ -148,27 +148,29 @@ public class ClusterStartupRule extends ExternalResource implements Serializable @Override protected void after() { -try { - DUnitLauncher.closeAndCheckForSuspects(); -} finally { - MemberStarterRule.disconnectDSIfAny(); - - // stop all the members in the order of clients, servers and locators - List vms = new ArrayList<>(); - vms.addAll( - occupiedVMs.values().stream().filter(x -> x.isClient()).collect(Collectors.toSet())); - vms.addAll( - occupiedVMs.values().stream().filter(x -> x.isServer()).collect(Collectors.toSet())); - vms.addAll( - occupiedVMs.values().stream().filter(x -> x.isLocator()).collect(Collectors.toSet())); - vms.forEach(x -> x.stop()); - - // delete any file under root dir - Arrays.stream(getWorkingDirRoot().listFiles()).filter(File::isFile) - .forEach(FileUtils::deleteQuietly); - - restoreSystemProperties.after(); -} + +MemberStarterRule.disconnectDSIfAny(); + +// stop all the members in the order of clients, servers and locators +List vms = new ArrayList<>(); +vms.addAll( +occupiedVMs.values().stream().filter(x -> x.isClient()).collect(Collectors.toSet())); +vms.addAll( +occupiedVMs.values().stream().filter(x -> x.isServer()).collect(Collectors.toSet())); +vms.addAll( +occupiedVMs.values().stream().filter(x -> x.isLocator()).collect(Collectors.toSet())); +vms.forEach(x -> x.stop()); + +// delete any file under root dir +Arrays.stream(getWorkingDirRoot().listFiles()).filter(File::isFile) +.forEach(FileUtils::deleteQuietly); + +restoreSystemProperties.after(); + +// close suspect string at the end of tear down +// any background thread can fill the dunit_suspect.log +// after its been truncated if we do it before closing cache +DUnitLauncher.closeAndCheckForSuspects(); } public MemberVM startLocatorVM(int index, int... locatorPort) {
[geode] branch develop updated: Feature/geode 5624 Use a single thread to ensure beforeCompletion and afterCompletion are executed by the same thread. (#2388)
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 926f35e Feature/geode 5624 Use a single thread to ensure beforeCompletion and afterCompletion are executed by the same thread. (#2388) 926f35e is described below commit 926f35eb1d20c3b4bbe26472aea6ad74048dc8aa Author: pivotal-eshu AuthorDate: Tue Aug 28 12:29:56 2018 -0700 Feature/geode 5624 Use a single thread to ensure beforeCompletion and afterCompletion are executed by the same thread. (#2388) --- .../ClientServerJTAFailoverDistributedTest.java| 37 +- .../geode/internal/cache/AfterCompletion.java | 100 .../geode/internal/cache/BeforeCompletion.java | 68 +++ .../internal/cache/SingleThreadJTAExecutor.java| 71 +++ .../org/apache/geode/internal/cache/TXState.java | 56 +++-- .../geode/internal/cache/AfterCompletionTest.java | 131 + .../geode/internal/cache/BeforeCompletionTest.java | 98 +++ .../cache/SingleThreadJTAExecutorTest.java | 66 +++ .../apache/geode/internal/cache/TXStateTest.java | 50 +++- 9 files changed, 632 insertions(+), 45 deletions(-) diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/jta/ClientServerJTAFailoverDistributedTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/jta/ClientServerJTAFailoverDistributedTest.java index cb6be25..5d60b6b 100644 --- a/geode-core/src/distributedTest/java/org/apache/geode/internal/jta/ClientServerJTAFailoverDistributedTest.java +++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/jta/ClientServerJTAFailoverDistributedTest.java @@ -34,6 +34,7 @@ import org.junit.Test; import org.apache.geode.cache.PartitionAttributesFactory; import org.apache.geode.cache.Region; import org.apache.geode.cache.RegionFactory; +import org.apache.geode.cache.RegionShortcut; import org.apache.geode.cache.TransactionId; import org.apache.geode.cache.client.ClientRegionFactory; import org.apache.geode.cache.client.PoolFactory; @@ -65,12 +66,14 @@ public class ClientServerJTAFailoverDistributedTest implements Serializable { private String hostName; private String uniqueName; private String regionName; + private String replicateRegionName; private VM server1; private VM server2; private VM server3; private VM client1; private int port1; private int port2; + private boolean hasReplicateRegion = false; @Rule public DistributedRule distributedRule = new DistributedRule(); @@ -94,6 +97,7 @@ public class ClientServerJTAFailoverDistributedTest implements Serializable { hostName = getHostName(); uniqueName = getClass().getSimpleName() + "_" + testName.getMethodName(); regionName = uniqueName + "_region"; +replicateRegionName = uniqueName + "_replicate_region"; } @Test @@ -130,6 +134,12 @@ public class ClientServerJTAFailoverDistributedTest implements Serializable { regionFactory.setPartitionAttributes(partitionAttributesFactory.create()); regionFactory.create(regionName); +if (hasReplicateRegion) { + cacheRule.getOrCreateCache().createRegionFactory(RegionShortcut.REPLICATE) + .create(replicateRegionName); +} + + CacheServer server = cacheRule.getCache().addCacheServer(); server.setPort(0); server.start(); @@ -152,6 +162,10 @@ public class ClientServerJTAFailoverDistributedTest implements Serializable { clientRegionFactory.setPoolName(pool.getName()); clientRegionFactory.create(regionName); +if (hasReplicateRegion) { + clientRegionFactory.create(replicateRegionName); +} + if (ports.length > 1) { pool.acquireConnection(new ServerLocation(hostName, port1)); } @@ -174,10 +188,13 @@ public class ClientServerJTAFailoverDistributedTest implements Serializable { Object[] results = new Object[2]; InternalClientCache cache = clientCacheRule.getClientCache(); Region region = cache.getRegion(regionName); +Region replicateRegion = hasReplicateRegion ? cache.getRegion(replicateRegionName) : null; TXManagerImpl txManager = (TXManagerImpl) cache.getCacheTransactionManager(); txManager.begin(); region.put(key, newValue); - +if (hasReplicateRegion) { + replicateRegion.put(key, newValue); +} TXStateProxyImpl txStateProxy = (TXStateProxyImpl) txManager.getTXState(); ClientTXStateStub clientTXStateStub = (ClientTXStateStub) txStateProxy.getRealDeal(null, null); clientTXStateStub.beforeCompletion(); @@ -191,6 +208,7 @@ public class ClientServerJTAFailoverDistributedTest implements Serializable { private void doAfterCompletion(TransactionId transactionId, boolean isCommit) { InternalClientCache cache =
[geode] branch develop updated: GEODE-5608 truncate fork/branch names in image/instance naming (#2390)
This is an automated email from the ASF dual-hosted git repository. jbarrett pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new aa915c2 GEODE-5608 truncate fork/branch names in image/instance naming (#2390) aa915c2 is described below commit aa915c2ba7d07a641c8ec65f473dd60f44806606 Author: FSOUTHERLAND <39743785+fsoutherl...@users.noreply.github.com> AuthorDate: Tue Aug 28 10:30:24 2018 -0700 GEODE-5608 truncate fork/branch names in image/instance naming (#2390) * GEODE-5608 truncate fork/branch names in image/instance naming (#2363) Co-authored-by: Jacob Barrett Co-authored-by: Finn Southerland Co-authored-by: Robert Houghton --- ci/images/google-geode-builder/build_image.sh | 9 +++--- ci/pipelines/README.md | 2 +- ci/pipelines/clean_fork_pipelines.sh| 18 +++- ci/pipelines/deploy_meta.sh | 15 -- ci/pipelines/examples/deploy_pipeline.sh| 22 -- ci/pipelines/geode-build/deploy_pipeline.sh | 16 ++ ci/pipelines/images/deploy_images_pipeline.sh | 10 +-- ci/pipelines/meta.yml | 3 ++ ci/pipelines/pull-request/deploy_pr_pipeline.sh | 22 -- ci/pipelines/render.py | 39 ++--- ci/pipelines/shared/shared_jinja.yml| 2 +- ci/pipelines/shared/utilities.sh| 29 ++ ci/scripts/start_instance.sh| 12 +--- 13 files changed, 142 insertions(+), 57 deletions(-) diff --git a/ci/images/google-geode-builder/build_image.sh b/ci/images/google-geode-builder/build_image.sh index 885392f..6cdf219 100755 --- a/ci/images/google-geode-builder/build_image.sh +++ b/ci/images/google-geode-builder/build_image.sh @@ -26,8 +26,6 @@ SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" pushd ${SCRIPTDIR} -GEODE_BRANCH=${GEODE_BRANCH:-$(git rev-parse --abbrev-ref HEAD)} -SANITIZED_GEODE_BRANCH=$(echo ${GEODE_BRANCH} | tr "/" "-" | tr '[:upper:]' '[:lower:]') IMAGE_FAMILY_PREFIX="" GEODE_DOCKER_IMAGE=${GEODE_DOCKER_IMAGE:-"gcr.io/apachegeode-ci/test-container"} if [[ -z "${GEODE_FORK}" ]]; then @@ -35,9 +33,12 @@ if [[ -z "${GEODE_FORK}" ]]; then exit 1 fi +GEODE_BRANCH=${GEODE_BRANCH:-$(git rev-parse --abbrev-ref HEAD)} +SANITIZED_GEODE_BRANCH=$(echo ${GEODE_BRANCH} | tr "/" "-" | tr '[:upper:]' '[:lower:]' | cut -c 1-20) +SANITIZED_GEODE_FORK=$(echo ${GEODE_FORK} | tr "/" "-" | tr '[:upper:]' '[:lower:]' | cut -c 1-16) -if [[ "${GEODE_FORK}" != "apache" ]]; then - IMAGE_FAMILY_PREFIX="${GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-" +if [[ "${SANITIZED_GEODE_FORK}" != "apache" ]]; then + IMAGE_FAMILY_PREFIX="${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-" fi echo "Running packer" diff --git a/ci/pipelines/README.md b/ci/pipelines/README.md index 1f761ed..40eab56 100644 --- a/ci/pipelines/README.md +++ b/ci/pipelines/README.md @@ -11,7 +11,7 @@ To generate a pipeline, using jinja: (for the pipeline you want to create): ```bash -./render.py +./render.py ``` The generated file should be named `generated-pipeline.yml`. \ No newline at end of file diff --git a/ci/pipelines/clean_fork_pipelines.sh b/ci/pipelines/clean_fork_pipelines.sh index 903dcf1..1a19443 100755 --- a/ci/pipelines/clean_fork_pipelines.sh +++ b/ci/pipelines/clean_fork_pipelines.sh @@ -19,7 +19,11 @@ TARGET=geode GEODE_FORK=${1} CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) GEODE_BRANCH=${2:-${CURRENT_BRANCH}} -SANITIZED_GEODE_BRANCH=$(echo ${GEODE_BRANCH} | tr "/" "-" | tr '[:upper:]' '[:lower:]') + +. ${SCRIPTDIR}/../shared/utilities.sh +SANITIZED_GEODE_BRANCH=$(getSanitizedBranch ${GEODE_BRANCH}) +SANITIZED_GEODE_FORK=$(getSanitizedFork ${GEODE_FORK}) + TEAM=$(fly targets | grep ^${TARGET} | awk '{print $3}') if [[ -z "${GEODE_FORK}" ]]; then @@ -31,22 +35,22 @@ echo "Fork is ${GEODE_FORK}" echo "Branch is ${GEODE_BRANCH}" echo "Deleting meta pipeline if it exists..." -META_PIPELINE="meta-${GEODE_FORK}-${SANITIZED_GEODE_BRANCH}" +META_PIPELINE="meta-${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}" fly -t ${TARGET} destroy-pipeline --non-interactive -p ${META_PIPELINE} echo "Deleting images pipeline if it exists..." -IMAGES_PIPELINE="${GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-images" +IMAGES_PIPELINE="${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-images" fly -t ${TARGET} destroy-pipeline --non-interactive -p ${IMAGES_PIPELINE} echo "Deleting reaper pipeline if it exists..." -REAPER_PIPELINE="${GEOD_FORK}-${SANITIZED_GEODE_BRANCH}-reaper" +REAPER_PIPELINE="${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-reaper" fly -t ${TARGET} destroy-pipeline --non-interactive -p ${REAPER_PIPELINE} echo "Deleting build pipeline if it exists..."
[geode] branch develop updated: Revert "GEODE-5608 truncate fork/branch names in image/instance naming (#2363)"
This is an automated email from the ASF dual-hosted git repository. jbarrett pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 366594c Revert "GEODE-5608 truncate fork/branch names in image/instance naming (#2363)" 366594c is described below commit 366594ca6f4807b6dfaa1fc9162f3760ecd18a58 Author: Jacob Barrett AuthorDate: Tue Aug 28 10:16:25 2018 -0700 Revert "GEODE-5608 truncate fork/branch names in image/instance naming (#2363)" This reverts commit 58e4035f7678e7198bb3c59f719d94a27a9144b2. --- ci/images/google-geode-builder/build_image.sh | 9 +++--- ci/pipelines/README.md | 2 +- ci/pipelines/clean_fork_pipelines.sh| 18 +--- ci/pipelines/deploy_meta.sh | 15 ++ ci/pipelines/examples/deploy_pipeline.sh| 22 ++ ci/pipelines/geode-build/deploy_pipeline.sh | 16 -- ci/pipelines/images/deploy_images_pipeline.sh | 10 ++- ci/pipelines/meta.yml | 3 -- ci/pipelines/pull-request/deploy_pr_pipeline.sh | 22 ++ ci/pipelines/render.py | 39 +++-- ci/pipelines/shared/shared_jinja.yml| 2 +- ci/pipelines/shared/utilities.sh| 29 -- ci/scripts/start_instance.sh| 12 +++- 13 files changed, 57 insertions(+), 142 deletions(-) diff --git a/ci/images/google-geode-builder/build_image.sh b/ci/images/google-geode-builder/build_image.sh index 6cdf219..885392f 100755 --- a/ci/images/google-geode-builder/build_image.sh +++ b/ci/images/google-geode-builder/build_image.sh @@ -26,6 +26,8 @@ SCRIPTDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" pushd ${SCRIPTDIR} +GEODE_BRANCH=${GEODE_BRANCH:-$(git rev-parse --abbrev-ref HEAD)} +SANITIZED_GEODE_BRANCH=$(echo ${GEODE_BRANCH} | tr "/" "-" | tr '[:upper:]' '[:lower:]') IMAGE_FAMILY_PREFIX="" GEODE_DOCKER_IMAGE=${GEODE_DOCKER_IMAGE:-"gcr.io/apachegeode-ci/test-container"} if [[ -z "${GEODE_FORK}" ]]; then @@ -33,12 +35,9 @@ if [[ -z "${GEODE_FORK}" ]]; then exit 1 fi -GEODE_BRANCH=${GEODE_BRANCH:-$(git rev-parse --abbrev-ref HEAD)} -SANITIZED_GEODE_BRANCH=$(echo ${GEODE_BRANCH} | tr "/" "-" | tr '[:upper:]' '[:lower:]' | cut -c 1-20) -SANITIZED_GEODE_FORK=$(echo ${GEODE_FORK} | tr "/" "-" | tr '[:upper:]' '[:lower:]' | cut -c 1-16) -if [[ "${SANITIZED_GEODE_FORK}" != "apache" ]]; then - IMAGE_FAMILY_PREFIX="${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-" +if [[ "${GEODE_FORK}" != "apache" ]]; then + IMAGE_FAMILY_PREFIX="${GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-" fi echo "Running packer" diff --git a/ci/pipelines/README.md b/ci/pipelines/README.md index 40eab56..1f761ed 100644 --- a/ci/pipelines/README.md +++ b/ci/pipelines/README.md @@ -11,7 +11,7 @@ To generate a pipeline, using jinja: (for the pipeline you want to create): ```bash -./render.py +./render.py ``` The generated file should be named `generated-pipeline.yml`. \ No newline at end of file diff --git a/ci/pipelines/clean_fork_pipelines.sh b/ci/pipelines/clean_fork_pipelines.sh index 1a19443..903dcf1 100755 --- a/ci/pipelines/clean_fork_pipelines.sh +++ b/ci/pipelines/clean_fork_pipelines.sh @@ -19,11 +19,7 @@ TARGET=geode GEODE_FORK=${1} CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) GEODE_BRANCH=${2:-${CURRENT_BRANCH}} - -. ${SCRIPTDIR}/../shared/utilities.sh -SANITIZED_GEODE_BRANCH=$(getSanitizedBranch ${GEODE_BRANCH}) -SANITIZED_GEODE_FORK=$(getSanitizedFork ${GEODE_FORK}) - +SANITIZED_GEODE_BRANCH=$(echo ${GEODE_BRANCH} | tr "/" "-" | tr '[:upper:]' '[:lower:]') TEAM=$(fly targets | grep ^${TARGET} | awk '{print $3}') if [[ -z "${GEODE_FORK}" ]]; then @@ -35,22 +31,22 @@ echo "Fork is ${GEODE_FORK}" echo "Branch is ${GEODE_BRANCH}" echo "Deleting meta pipeline if it exists..." -META_PIPELINE="meta-${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}" +META_PIPELINE="meta-${GEODE_FORK}-${SANITIZED_GEODE_BRANCH}" fly -t ${TARGET} destroy-pipeline --non-interactive -p ${META_PIPELINE} echo "Deleting images pipeline if it exists..." -IMAGES_PIPELINE="${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-images" +IMAGES_PIPELINE="${GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-images" fly -t ${TARGET} destroy-pipeline --non-interactive -p ${IMAGES_PIPELINE} echo "Deleting reaper pipeline if it exists..." -REAPER_PIPELINE="${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}-reaper" +REAPER_PIPELINE="${GEOD_FORK}-${SANITIZED_GEODE_BRANCH}-reaper" fly -t ${TARGET} destroy-pipeline --non-interactive -p ${REAPER_PIPELINE} echo "Deleting build pipeline if it exists..." -BUILD_PIPELINE="${SANITIZED_GEODE_FORK}-${SANITIZED_GEODE_BRANCH}" +BUILD_PIPELINE="${GEODE_FORK}-${SANITIZED_GEODE_BRANCH}" fly -t ${TARGET} destroy-pipeline --non-interactive -p ${BUILD_PIPELINE}
[geode] branch feature/GEODE-5624 updated (3d0801f -> 40ea58d)
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a change to branch feature/GEODE-5624 in repository https://gitbox.apache.org/repos/asf/geode.git. from 3d0801f wip. add 40ea58d fix a race in the test. No new revisions were added by this update. Summary of changes: .../apache/geode/internal/cache/SingleThreadJTAExecutorTest.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)
[geode] branch develop updated (60ea939 -> 58e4035)
This is an automated email from the ASF dual-hosted git repository. jbarrett pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 60ea939 GEODE-5618: Auth Attributes in FunctionService (#2360) add 58e4035 GEODE-5608 truncate fork/branch names in image/instance naming (#2363) No new revisions were added by this update. Summary of changes: ci/images/google-geode-builder/build_image.sh | 9 ++--- ci/pipelines/README.md | 2 +- ci/pipelines/clean_fork_pipelines.sh | 18 ++ ci/pipelines/deploy_meta.sh| 15 +++-- ci/pipelines/examples/deploy_pipeline.sh | 22 +++- ci/pipelines/geode-build/deploy_pipeline.sh| 16 + ci/pipelines/images/deploy_images_pipeline.sh | 10 -- ci/pipelines/meta.yml | 3 ++ ci/pipelines/pull-request/deploy_pr_pipeline.sh| 22 +++- ci/pipelines/render.py | 39 -- ci/pipelines/shared/shared_jinja.yml | 2 +- .../files/check => pipelines/shared/utilities.sh} | 14 ci/scripts/start_instance.sh | 12 --- 13 files changed, 121 insertions(+), 63 deletions(-) copy ci/{resource-types/concourse-metadata-resource/files/check => pipelines/shared/utilities.sh} (79%) mode change 100755 => 100644
[geode] branch develop updated: GEODE-5618: Auth Attributes in FunctionService (#2360)
This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 60ea939 GEODE-5618: Auth Attributes in FunctionService (#2360) 60ea939 is described below commit 60ea939e85e7d94da9d8eb64d5b88dd62edb2618 Author: Juan José Ramos AuthorDate: Tue Aug 28 09:11:50 2018 +0100 GEODE-5618: Auth Attributes in FunctionService (#2360) * When a client executes a function using the id instead of the actual instance, an internal invocation to the `GetFunctionAttributeOp` function is executed to get the metadata about the original function itself. This invocation doesn't set the user attributes requried by the authentication mechanism, so the entire invocation fails. * Added distributed tests. * Classes `ServerFunctionExecutor` and `ServerRegionFunctionExecutor` now set the `userAttributes` in the local thread before getting the metadata when the function is executed by id. --- ...UserAuthenticationFunctionServiceDUnitTest.java | 183 + .../cache/execute/ServerFunctionExecutor.java | 43 +++-- .../execute/ServerRegionFunctionExecutor.java | 42 +++-- 3 files changed, 234 insertions(+), 34 deletions(-) diff --git a/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/MultiUserAuthenticationFunctionServiceDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/MultiUserAuthenticationFunctionServiceDUnitTest.java new file mode 100644 index 000..e45dbe5 --- /dev/null +++ b/geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/MultiUserAuthenticationFunctionServiceDUnitTest.java @@ -0,0 +1,183 @@ +/* + * 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.execute; + +import static org.apache.geode.distributed.ConfigurationProperties.LOCATORS; +import static org.apache.geode.distributed.ConfigurationProperties.MCAST_PORT; +import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_CLIENT_AUTH_INIT; +import static org.apache.geode.distributed.ConfigurationProperties.SECURITY_MANAGER; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; +import java.util.Properties; + +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import org.apache.geode.DataSerializable; +import org.apache.geode.cache.Region; +import org.apache.geode.cache.RegionService; +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.execute.Function; +import org.apache.geode.cache.execute.FunctionContext; +import org.apache.geode.cache.execute.FunctionException; +import org.apache.geode.cache.execute.FunctionService; +import org.apache.geode.examples.SimpleSecurityManager; +import org.apache.geode.security.NotAuthorizedException; +import org.apache.geode.security.templates.UserPasswordAuthInit; +import org.apache.geode.test.dunit.IgnoredException; +import org.apache.geode.test.dunit.rules.ClusterStartupRule; +import org.apache.geode.test.dunit.rules.MemberVM; +import org.apache.geode.test.junit.categories.FunctionServiceTest; +import org.apache.geode.test.junit.categories.SecurityTest; +import org.apache.geode.test.junit.rules.GfshCommandRule; + +@Category({SecurityTest.class, FunctionServiceTest.class}) +public class MultiUserAuthenticationFunctionServiceDUnitTest { + private static MemberVM locator, server; + private static Properties clientProperties; + + @ClassRule + public static GfshCommandRule gfsh = new GfshCommandRule(); + + @ClassRule + public static ClusterStartupRule lsRule = new ClusterStartupRule(); + + @BeforeClass + public static void beforeClass() throws