mirror of
https://github.com/bisq-network/bisq.git
synced 2025-03-03 02:39:24 +01:00
Remove redundant ApiTestConfig options
This change removes three options: runArbNodeAsDesktop, runAliceNodeAsDesktop, and runBobNodeAsDesktop, which should have been deleted when the supportingApps option was added. The comma delimited list of apps passed with the supportingApps option now determines whether arbitration / bob / alice nodes are started as desktops or daemons.
This commit is contained in:
parent
cb6166c65f
commit
b9c1feba9a
2 changed files with 15 additions and 41 deletions
|
@ -311,17 +311,25 @@ public class Scaffold {
|
|||
bitcoinDaemon.verifyBitcoindRunning();
|
||||
}
|
||||
|
||||
// Start Bisq apps defined by the supportingApps option, in the in proper order.
|
||||
|
||||
if (config.hasSupportingApp(seednode.name()))
|
||||
startBisqApp(seednode, executor, countdownLatch);
|
||||
|
||||
if (config.hasSupportingApp(arbdaemon.name(), arbdesktop.name()))
|
||||
startBisqApp(config.runArbNodeAsDesktop ? arbdesktop : arbdaemon, executor, countdownLatch);
|
||||
if (config.hasSupportingApp(arbdaemon.name()))
|
||||
startBisqApp(arbdaemon, executor, countdownLatch);
|
||||
else if (config.hasSupportingApp(arbdesktop.name()))
|
||||
startBisqApp(arbdesktop, executor, countdownLatch);
|
||||
|
||||
if (config.hasSupportingApp(alicedaemon.name(), alicedesktop.name()))
|
||||
startBisqApp(config.runAliceNodeAsDesktop ? alicedesktop : alicedaemon, executor, countdownLatch);
|
||||
if (config.hasSupportingApp(alicedaemon.name()))
|
||||
startBisqApp(alicedaemon, executor, countdownLatch);
|
||||
else if (config.hasSupportingApp(alicedesktop.name()))
|
||||
startBisqApp(alicedesktop, executor, countdownLatch);
|
||||
|
||||
if (config.hasSupportingApp(bobdaemon.name(), bobdesktop.name()))
|
||||
startBisqApp(config.runBobNodeAsDesktop ? bobdesktop : bobdaemon, executor, countdownLatch);
|
||||
if (config.hasSupportingApp(bobdaemon.name()))
|
||||
startBisqApp(bobdaemon, executor, countdownLatch);
|
||||
else if (config.hasSupportingApp(bobdesktop.name()))
|
||||
startBisqApp(bobdesktop, executor, countdownLatch);
|
||||
}
|
||||
|
||||
private void startBisqApp(BisqAppConfig bisqAppConfig,
|
||||
|
@ -329,28 +337,24 @@ public class Scaffold {
|
|||
CountDownLatch countdownLatch)
|
||||
throws IOException, InterruptedException {
|
||||
|
||||
BisqApp bisqApp;
|
||||
BisqApp bisqApp = createBisqApp(bisqAppConfig);
|
||||
switch (bisqAppConfig) {
|
||||
case seednode:
|
||||
bisqApp = createBisqApp(seednode);
|
||||
seedNodeTask = new SetupTask(bisqApp, countdownLatch);
|
||||
seedNodeTaskFuture = executor.submit(seedNodeTask);
|
||||
break;
|
||||
case arbdaemon:
|
||||
case arbdesktop:
|
||||
bisqApp = createBisqApp(config.runArbNodeAsDesktop ? arbdesktop : arbdaemon);
|
||||
arbNodeTask = new SetupTask(bisqApp, countdownLatch);
|
||||
arbNodeTaskFuture = executor.submit(arbNodeTask);
|
||||
break;
|
||||
case alicedaemon:
|
||||
case alicedesktop:
|
||||
bisqApp = createBisqApp(config.runAliceNodeAsDesktop ? alicedesktop : alicedaemon);
|
||||
aliceNodeTask = new SetupTask(bisqApp, countdownLatch);
|
||||
aliceNodeTaskFuture = executor.submit(aliceNodeTask);
|
||||
break;
|
||||
case bobdaemon:
|
||||
case bobdesktop:
|
||||
bisqApp = createBisqApp(config.runBobNodeAsDesktop ? bobdesktop : bobdaemon);
|
||||
bobNodeTask = new SetupTask(bisqApp, countdownLatch);
|
||||
bobNodeTaskFuture = executor.submit(bobNodeTask);
|
||||
break;
|
||||
|
|
|
@ -65,9 +65,6 @@ public class ApiTestConfig {
|
|||
static final String ROOT_APP_DATA_DIR = "rootAppDataDir";
|
||||
static final String API_PASSWORD = "apiPassword";
|
||||
static final String RUN_SUBPROJECT_JARS = "runSubprojectJars";
|
||||
static final String RUN_ARB_NODE_AS_DESKTOP = "runArbNodeAsDesktop";
|
||||
static final String RUN_ALICE_NODE_AS_DESKTOP = "runAliceNodeAsDesktop";
|
||||
static final String RUN_BOB_NODE_AS_DESKTOP = "runBobNodeAsDesktop";
|
||||
static final String BISQ_APP_INIT_TIME = "bisqAppInitTime";
|
||||
static final String SKIP_TESTS = "skipTests";
|
||||
static final String SHUTDOWN_AFTER_TESTS = "shutdownAfterTests";
|
||||
|
@ -98,9 +95,6 @@ public class ApiTestConfig {
|
|||
// Daemon instances can use same gRPC password, but each needs a different apiPort.
|
||||
public final String apiPassword;
|
||||
public final boolean runSubprojectJars;
|
||||
public final boolean runArbNodeAsDesktop;
|
||||
public final boolean runAliceNodeAsDesktop;
|
||||
public final boolean runBobNodeAsDesktop;
|
||||
public final long bisqAppInitTime;
|
||||
public final boolean skipTests;
|
||||
public final boolean shutdownAfterTests;
|
||||
|
@ -202,27 +196,6 @@ public class ApiTestConfig {
|
|||
.ofType(Boolean.class)
|
||||
.defaultsTo(false);
|
||||
|
||||
ArgumentAcceptingOptionSpec<Boolean> runArbNodeAsDesktopOpt =
|
||||
parser.accepts(RUN_ARB_NODE_AS_DESKTOP,
|
||||
"Run Arbitration node as desktop")
|
||||
.withRequiredArg()
|
||||
.ofType(Boolean.class)
|
||||
.defaultsTo(false); // TODO how do I register mediator?
|
||||
|
||||
ArgumentAcceptingOptionSpec<Boolean> runAliceNodeAsDesktopOpt =
|
||||
parser.accepts(RUN_ALICE_NODE_AS_DESKTOP,
|
||||
"Run Alice node as desktop")
|
||||
.withRequiredArg()
|
||||
.ofType(Boolean.class)
|
||||
.defaultsTo(false);
|
||||
|
||||
ArgumentAcceptingOptionSpec<Boolean> runBobNodeAsDesktopOpt =
|
||||
parser.accepts(RUN_BOB_NODE_AS_DESKTOP,
|
||||
"Run Bob node as desktop")
|
||||
.withRequiredArg()
|
||||
.ofType(Boolean.class)
|
||||
.defaultsTo(false);
|
||||
|
||||
ArgumentAcceptingOptionSpec<Long> bisqAppInitTimeOpt =
|
||||
parser.accepts(BISQ_APP_INIT_TIME,
|
||||
"Amount of time (ms) to wait on a Bisq instance's initialization")
|
||||
|
@ -302,9 +275,6 @@ public class ApiTestConfig {
|
|||
this.bitcoinRpcPassword = options.valueOf(bitcoinRpcPasswordOpt);
|
||||
this.apiPassword = options.valueOf(apiPasswordOpt);
|
||||
this.runSubprojectJars = options.valueOf(runSubprojectJarsOpt);
|
||||
this.runArbNodeAsDesktop = options.valueOf(runArbNodeAsDesktopOpt);
|
||||
this.runAliceNodeAsDesktop = options.valueOf(runAliceNodeAsDesktopOpt);
|
||||
this.runBobNodeAsDesktop = options.valueOf(runBobNodeAsDesktopOpt);
|
||||
this.bisqAppInitTime = options.valueOf(bisqAppInitTimeOpt);
|
||||
this.skipTests = options.valueOf(skipTestsOpt);
|
||||
this.shutdownAfterTests = options.valueOf(shutdownAfterTestsOpt);
|
||||
|
|
Loading…
Add table
Reference in a new issue