Skip to content

Commit

Permalink
remove further redundant occurrences of "consumer enabled" boolean
Browse files Browse the repository at this point in the history
  • Loading branch information
pstaeck committed Apr 16, 2024
1 parent 513334f commit 0578a46
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions sdccc/src/main/java/com/draeger/medical/sdccc/TestSuite.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,11 @@ public long runTestSuite() {
final SummaryGeneratingListener directSummary = new SummaryGeneratingListener();
directTestLauncher.registerTestExecutionListeners(directSummary);

final Boolean isConsumerEnabled = setupDevice();

long totalTestFailures = 0L;
/*
* Phase 1, generate messages
*/
phase1(isConsumerEnabled);
phase1();

/*
* Phase 2, execute direct tests
Expand Down Expand Up @@ -272,10 +270,9 @@ private long phase2(
return totalTestFailures + directSummary.getSummary().getTotalFailureCount();
}

private void phase1(final Boolean isConsumerEnabled) {
if (isConsumerEnabled) {
performBasicMessagingCheck();
}
private void phase1() {
setupDevice();
performBasicMessagingCheck();

try {
Thread.sleep(TIME_BETWEEN_PHASES);
Expand Down Expand Up @@ -364,7 +361,7 @@ private void performBasicMessagingCheck() {
LOG.info("SDC Basic Messaging Check completed" + statusline + ".");
}

private Boolean setupDevice() {
private void setupDevice() {
LOG.info("Starting TestSuite Client");
try {
client.startService(MAX_WAIT);
Expand All @@ -380,7 +377,6 @@ private Boolean setupDevice() {
client.getHostingServiceProxy().getHostedServices().values().stream()
.anyMatch(service ->
service.getType().getTypes().contains(WsdlConstants.PORT_TYPE_ARCHIVE_QNAME)));
return true;
}

/**
Expand Down

0 comments on commit 0578a46

Please sign in to comment.