Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public class DeliveryAssuranceOnewayTest extends AbstractBusClientServerTestBase
private Endpoint endpoint;
private Bus greeterBus;
private Greeter greeter;
private ExecutorService executorService;

@After
public void tearDown() throws Exception {
Expand All @@ -89,6 +90,13 @@ public void tearDown() throws Exception {
} catch (Throwable t) {
//ignore
}
if (executorService != null) {
executorService.shutdown();
if (!executorService.awaitTermination(10, TimeUnit.SECONDS)) {
executorService.shutdownNow();
}
executorService = null;
}
Thread.sleep(100);
}

Expand Down Expand Up @@ -380,6 +388,9 @@ private void initProxy(Executor executor) {

if (null != executor) {
gs.setExecutor(executor);
if (executor instanceof ExecutorService) {
this.executorService = (ExecutorService) executor;
}
}

greeter = gs.getGreeterPort();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Set;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -81,6 +82,7 @@ public class MessageCallbackOnewayTest extends AbstractBusClientServerTestBase {
private Bus greeterBus;
private Greeter greeter;
private RecordingMessageCallback callback;
private ExecutorService executorService;

@After
public void tearDown() throws Exception {
Expand All @@ -94,6 +96,13 @@ public void tearDown() throws Exception {
} catch (Throwable t) {
//ignore
}
if (executorService != null) {
executorService.shutdown();
if (!executorService.awaitTermination(10, TimeUnit.SECONDS)) {
executorService.shutdownNow();
}
executorService = null;
}
}

@Test(timeout = 60000)
Expand Down Expand Up @@ -216,6 +225,9 @@ private void initProxy(Executor executor) {

if (null != executor) {
gs.setExecutor(executor);
if (executor instanceof ExecutorService) {
this.executorService = (ExecutorService) executor;
}
}

greeter = gs.getGreeterPort();
Expand Down