Skip to content

Commit

Permalink
Merge pull request #5169 from ghubstan/rename-apitest-bisqapp-class
Browse files Browse the repository at this point in the history
Rename apitest BisqApp -> BisqProcess
  • Loading branch information
ripcurlx authored Feb 10, 2021
2 parents 5ad670f + 2f6838e commit d30621e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions apitest/src/main/java/bisq/apitest/Scaffold.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
import bisq.apitest.config.ApiTestConfig;
import bisq.apitest.config.BisqAppConfig;
import bisq.apitest.linux.BashCommand;
import bisq.apitest.linux.BisqApp;
import bisq.apitest.linux.BisqProcess;
import bisq.apitest.linux.BitcoinDaemon;
import bisq.apitest.linux.LinuxProcess;

Expand Down Expand Up @@ -367,44 +367,44 @@ private void startBisqApp(BisqAppConfig bisqAppConfig,
CountDownLatch countdownLatch)
throws IOException, InterruptedException {

BisqApp bisqApp = createBisqApp(bisqAppConfig);
BisqProcess bisqProcess = createBisqProcess(bisqAppConfig);
switch (bisqAppConfig) {
case seednode:
seedNodeTask = new SetupTask(bisqApp, countdownLatch);
seedNodeTask = new SetupTask(bisqProcess, countdownLatch);
seedNodeTaskFuture = executor.submit(seedNodeTask);
break;
case arbdaemon:
case arbdesktop:
arbNodeTask = new SetupTask(bisqApp, countdownLatch);
arbNodeTask = new SetupTask(bisqProcess, countdownLatch);
arbNodeTaskFuture = executor.submit(arbNodeTask);
break;
case alicedaemon:
case alicedesktop:
aliceNodeTask = new SetupTask(bisqApp, countdownLatch);
aliceNodeTask = new SetupTask(bisqProcess, countdownLatch);
aliceNodeTaskFuture = executor.submit(aliceNodeTask);
break;
case bobdaemon:
case bobdesktop:
bobNodeTask = new SetupTask(bisqApp, countdownLatch);
bobNodeTask = new SetupTask(bisqProcess, countdownLatch);
bobNodeTaskFuture = executor.submit(bobNodeTask);
break;
default:
throw new IllegalStateException("Unknown BisqAppConfig " + bisqAppConfig.name());
}
log.info("Giving {} ms for {} to initialize ...", config.bisqAppInitTime, bisqAppConfig.appName);
MILLISECONDS.sleep(config.bisqAppInitTime);
if (bisqApp.hasStartupExceptions()) {
bisqApp.logExceptions(bisqApp.getStartupExceptions(), log);
throw new IllegalStateException(bisqApp.getStartupExceptions().get(0));
if (bisqProcess.hasStartupExceptions()) {
bisqProcess.logExceptions(bisqProcess.getStartupExceptions(), log);
throw new IllegalStateException(bisqProcess.getStartupExceptions().get(0));
}
}

private BisqApp createBisqApp(BisqAppConfig bisqAppConfig)
private BisqProcess createBisqProcess(BisqAppConfig bisqAppConfig)
throws IOException, InterruptedException {
BisqApp bisqNode = new BisqApp(bisqAppConfig, config);
bisqNode.verifyAppNotRunning();
bisqNode.verifyAppDataDirInstalled();
return bisqNode;
BisqProcess bisqProcess = new BisqProcess(bisqAppConfig, config);
bisqProcess.verifyAppNotRunning();
bisqProcess.verifyAppDataDirInstalled();
return bisqProcess;
}

private void verifyStartupCompleted()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* Runs a regtest/dao Bisq application instance in the background.
*/
@Slf4j
public class BisqApp extends AbstractLinuxProcess implements LinuxProcess {
public class BisqProcess extends AbstractLinuxProcess implements LinuxProcess {

private final BisqAppConfig bisqAppConfig;
private final String baseCurrencyNetwork;
Expand All @@ -55,7 +55,7 @@ public class BisqApp extends AbstractLinuxProcess implements LinuxProcess {
private final String findBisqPidScript;
private final String debugOpts;

public BisqApp(BisqAppConfig bisqAppConfig, ApiTestConfig config) {
public BisqProcess(BisqAppConfig bisqAppConfig, ApiTestConfig config) {
super(bisqAppConfig.appName, config);
this.bisqAppConfig = bisqAppConfig;
this.baseCurrencyNetwork = "BTC_REGTEST";
Expand Down

0 comments on commit d30621e

Please sign in to comment.