parent
2ee73a6c83
commit
cb320288a4
|
|
@ -59,8 +59,8 @@ class HazelcastAutoConfigurationTests {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A test {link {@link URLClassLoader} that emulates the default Hazelcast Jet
|
* A test {@link URLClassLoader} that emulates the default Hazelcast Jet configuration
|
||||||
* configuration file exists on the classpath.
|
* file exists on the classpath.
|
||||||
*/
|
*/
|
||||||
static class JetConfigClassLoader extends URLClassLoader {
|
static class JetConfigClassLoader extends URLClassLoader {
|
||||||
|
|
||||||
|
|
@ -73,12 +73,12 @@ class HazelcastAutoConfigurationTests {
|
||||||
@Override
|
@Override
|
||||||
public URL getResource(String name) {
|
public URL getResource(String name) {
|
||||||
if (name.equals("hazelcast-jet-default.yaml")) {
|
if (name.equals("hazelcast-jet-default.yaml")) {
|
||||||
return getEmulatedJestConfigUrl();
|
return getEmulatedJetConfigUrl();
|
||||||
}
|
}
|
||||||
return super.getResource(name);
|
return super.getResource(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
private URL getEmulatedJestConfigUrl() {
|
private URL getEmulatedJetConfigUrl() {
|
||||||
try {
|
try {
|
||||||
return FALLBACK.getURL();
|
return FALLBACK.getURL();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -236,10 +236,10 @@ For example, we can export the "Readiness" state of the application to a file so
|
||||||
[source,java,indent=0]
|
[source,java,indent=0]
|
||||||
----
|
----
|
||||||
@Component
|
@Component
|
||||||
public class ReadinessStateExporter implements ApplicationListener<LivenessStateChangedEvent> {
|
public class ReadinessStateExporter implements ApplicationListener<ReadinessStateChangedEvent> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationEvent(LivenessStateChangedEvent event) {
|
public void onApplicationEvent(ReadinessStateChangedEvent event) {
|
||||||
switch (event.getReadinessState().getStatus()) {
|
switch (event.getReadinessState().getStatus()) {
|
||||||
case READY:
|
case READY:
|
||||||
// create file /tmp/healthy
|
// create file /tmp/healthy
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue