|
1 | 1 | /* |
2 | | - * Copyright (c) 2000, 2024, Oracle and/or its affiliates. |
| 2 | + * Copyright (c) 2000, 2025, Oracle and/or its affiliates. |
3 | 3 | * |
4 | 4 | * Licensed under the Universal Permissive License v 1.0 as shown at |
5 | 5 | * https://oss.oracle.com/licenses/upl. |
|
22 | 22 | import com.oracle.bedrock.runtime.coherence.options.OperationalOverride; |
23 | 23 | import com.oracle.bedrock.runtime.coherence.options.WellKnownAddress; |
24 | 24 |
|
| 25 | +import com.oracle.bedrock.runtime.coherence.profiles.NativeImageProfile; |
25 | 26 | import com.oracle.bedrock.runtime.concurrent.RemoteCallable; |
26 | 27 |
|
27 | 28 | import com.oracle.bedrock.runtime.java.features.JmxFeature; |
@@ -236,25 +237,32 @@ public void shouldUseGlobalSocketProviderWithExtendProxy() throws Exception |
236 | 237 | assertThat(member.invoke(new IsSecureProxy()), is(true)); |
237 | 238 | } |
238 | 239 |
|
239 | | - System.setProperty(PROP_METRICS_ENABLED, "false"); |
240 | | - System.setProperty("coherence.extend.address", "127.0.0.1"); |
241 | | - System.setProperty("coherence.extend.port", String.valueOf(extendPort.get())); |
242 | | - |
243 | | - Coherence coherence = Coherence.client().start().get(5, TimeUnit.MINUTES); |
244 | | - Session session = coherence.getSession(); |
245 | | - try (NamedCache<String, String> cache = session.getCache("nameservice-test")) |
246 | | - { |
247 | | - String value = new UUID().toString(); |
248 | | - cache.put("key-1", value); |
249 | | - assertThat(cache.get("key-1"), is(value)); |
250 | | - } |
| 240 | +// if (!NativeImageProfile.isEnabled()) |
| 241 | +// { |
| 242 | + // Because of the way the certs are generated using an Ant script this test fails |
| 243 | + // when running with native image because the Ant script runs again after the native |
| 244 | + // image has built overwriting the certs, so the native image contains different certs |
| 245 | + // to those being used by this client. |
| 246 | + System.setProperty(PROP_METRICS_ENABLED, "false"); |
| 247 | + System.setProperty("coherence.extend.address", "127.0.0.1"); |
| 248 | + System.setProperty("coherence.extend.port", String.valueOf(extendPort.get())); |
| 249 | + |
| 250 | + Coherence coherence = Coherence.client().start().get(5, TimeUnit.MINUTES); |
| 251 | + Session session = coherence.getSession(); |
| 252 | + try (NamedCache<String, String> cache = session.getCache("nameservice-test")) |
| 253 | + { |
| 254 | + String value = new UUID().toString(); |
| 255 | + cache.put("key-1", value); |
| 256 | + assertThat(cache.get("key-1"), is(value)); |
| 257 | + } |
251 | 258 |
|
252 | | - try (NamedCache<String, String> cache = session.getCache("fixed-test")) |
253 | | - { |
254 | | - String value = new UUID().toString(); |
255 | | - cache.put("key-1", value); |
256 | | - assertThat(cache.get("key-1"), is(value)); |
257 | | - } |
| 259 | + try (NamedCache<String, String> cache = session.getCache("fixed-test")) |
| 260 | + { |
| 261 | + String value = new UUID().toString(); |
| 262 | + cache.put("key-1", value); |
| 263 | + assertThat(cache.get("key-1"), is(value)); |
| 264 | + } |
| 265 | +// } |
258 | 266 | } |
259 | 267 | } |
260 | 268 |
|
|
0 commit comments