Skip to content

Commit

Permalink
Enh 37387065 - [37381796->25.03] Topics: general refactoring and hard…
Browse files Browse the repository at this point in the history
…ening

(merge main -> ce/main 113660)

[git-p4: depot-paths = "//dev/coherence-ce/main/": change = 113664]
  • Loading branch information
thegridman committed Jan 21, 2025
1 parent 59b8cc4 commit 2a08020
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
* Copyright (c) 2000, 2025, 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 @@ -655,10 +655,12 @@ private String getCacheName(String sPrefix)

private void restartService(NamedTopic<?> topic)
{
Service service = topic.getService();
String serviceName = service.getInfo().getServiceName();
PagedTopicService service = (PagedTopicService) topic.getService();
int cMember = service.getInfo().getServiceMembers().size();
String serviceName = service.getInfo().getServiceName();

System.err.println("Stopping topics cache service " + serviceName);

System.err.println("Stopping topics service " + serviceName);

Service serviceFinal = service instanceof SafeCacheService
? ((SafeCacheService) service).getRunningCacheService()
Expand All @@ -667,8 +669,10 @@ private void restartService(NamedTopic<?> topic)
serviceFinal.stop();
// wait for DCS to restart the service
Eventually.assertDeferred("Failed to restart service " + service, service::isRunning, is(true));
Eventually.assertDeferred("Failed to restart service waiting for membership count" + service,
() -> service.getInfo().getServiceMembers().size(), is(cMember));

System.err.println("Restarted topics cache service " + serviceName);
System.err.println("Restarted topics service " + serviceName);
}

// ----- inner class: Message -------------------------------------------
Expand Down

0 comments on commit 2a08020

Please sign in to comment.