Skip to content

Commit

Permalink
Bug 36349929 - [36349892->24.03] Error creating named executor view w…
Browse files Browse the repository at this point in the history
…hen using POF (merge main -> ce/main @ 107201)

[git-p4: depot-paths = "//dev/coherence-ce/main/": change = 107204]
  • Loading branch information
rlubke committed Feb 29, 2024
1 parent a213482 commit 4ac959e
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -54,7 +54,7 @@ public NamedClusteredExecutorService(Name name)
f_name = name;

m_viewNamed = Caches.executors(session())
.view().filter(Filters.equal(Extractors.extract("getOption", Name.class, null), f_name)).build();
.view().filter(Filters.equal(Extractors.extract("getExecutorName()"), f_name)).build();
}

// ----- ClusteredExecutorService methods ---------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -20,7 +20,6 @@
import com.oracle.bedrock.runtime.java.options.ClassName;
import com.oracle.bedrock.runtime.java.options.IPv4Preferred;

import com.oracle.bedrock.runtime.java.options.SystemProperty;
import com.oracle.bedrock.runtime.options.DisplayName;

import com.tangosol.net.Coherence;
Expand All @@ -33,7 +32,7 @@
* @author rl 7.12.2021
* @since 21.12
*/
public class RemoteExecutorExtendTestIT
public class RemoteExecutorExtendIT
extends AbstractRemoteExecutorTest
{
// ----- AbstractRemoteExecutorTest methods -----------------------------
Expand All @@ -51,7 +50,7 @@ protected Coherence getClient()
* under target/test-output. This is added as an option to the cluster
* and client processes.
*/
static TestLogs logs = new TestLogs(RemoteExecutorExtendTestIT.class);
static TestLogs logs = new TestLogs(RemoteExecutorExtendIT.class);

/**
* A Bedrock JUnit5 extension that starts a Coherence cluster of a single
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand All @@ -20,6 +20,7 @@
import com.oracle.bedrock.runtime.java.options.ClassName;
import com.oracle.bedrock.runtime.java.options.IPv4Preferred;

import com.oracle.bedrock.runtime.java.options.SystemProperty;
import com.oracle.bedrock.runtime.options.DisplayName;

import com.tangosol.net.Coherence;
Expand All @@ -32,9 +33,13 @@
* @author rl 7.12.2021
* @since 21.12
*/
public class RemoteExecutorTestIT
public class RemoteExecutorIT
extends AbstractRemoteExecutorTest
{
static
{
System.setProperty("coherence.concurrent.serializer", "pof");
}
// ----- AbstractRemoteExecutorTest methods -----------------------------

@Override
Expand All @@ -58,6 +63,7 @@ protected Coherence getClient()
LocalHost.only(),
Multicast.ttl(0),
IPv4Preferred.yes(),
SystemProperty.of("coherence.concurrent.serializer", "pof"),
ClusterPort.automatic())
.include(1,
DisplayName.of("storage"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* Copyright (c) 2024, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/
package concurrent.executor;

import com.oracle.bedrock.junit.CoherenceClusterExtension;

import com.oracle.bedrock.runtime.LocalPlatform;

import com.oracle.bedrock.runtime.coherence.options.ClusterPort;
import com.oracle.bedrock.runtime.coherence.options.LocalHost;
import com.oracle.bedrock.runtime.coherence.options.LocalStorage;
import com.oracle.bedrock.runtime.coherence.options.Logging;
import com.oracle.bedrock.runtime.coherence.options.Multicast;
import com.oracle.bedrock.runtime.coherence.options.Pof;
import com.oracle.bedrock.runtime.coherence.options.RoleName;

import com.oracle.bedrock.runtime.java.options.ClassName;
import com.oracle.bedrock.runtime.java.options.IPv4Preferred;

import com.oracle.bedrock.runtime.java.options.SystemProperty;
import com.oracle.bedrock.runtime.options.DisplayName;

import com.tangosol.net.Coherence;

import org.junit.jupiter.api.extension.RegisterExtension;

/**
* Tests to ensure RemoteExecutor can be on another cluster member using POF.
*
* @author rl 2.28.2024
* @since 15.1.1.0.0
*/
public class RemoteExecutorPofIT
extends AbstractRemoteExecutorTest
{
static
{
System.setProperty("coherence.concurrent.serializer", "pof");
}

// ----- AbstractRemoteExecutorTest methods -----------------------------

@Override
protected Coherence getClient()
{
return Coherence.clusterMember();
}

// ----- data members ---------------------------------------------------

/**
* A Bedrock JUnit5 extension that starts a Coherence cluster of a single
* storage-enabled member.
*/
@RegisterExtension
static CoherenceClusterExtension coherenceResource =
new CoherenceClusterExtension()
.using(LocalPlatform.get())
.with(ClassName.of(Coherence.class),
Logging.at(9),
LocalHost.only(),
Multicast.ttl(0),
IPv4Preferred.yes(),
SystemProperty.of("coherence.concurrent.serializer", "pof"),
ClusterPort.automatic())
.include(1,
DisplayName.of("storage"),
RoleName.of("storage"),
LocalStorage.enabled(),
Logging.at(9));
}

0 comments on commit 4ac959e

Please sign in to comment.