mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 09:00:26 +00:00
Test fixes
This commit is contained in:
parent
a5309f3614
commit
9ad3e1975e
2 changed files with 12 additions and 1 deletions
|
@ -40,6 +40,7 @@ public class AppProperties {
|
|||
AppVersion canonicalVersion;
|
||||
boolean locatePtb;
|
||||
boolean locatorVersionCheck;
|
||||
boolean isTest;
|
||||
|
||||
public AppProperties() {
|
||||
var appDir = Path.of(System.getProperty("user.dir")).resolve("app");
|
||||
|
@ -103,6 +104,16 @@ public class AppProperties {
|
|||
locatorVersionCheck = Optional.ofNullable(System.getProperty("io.xpipe.app.locator.disableInstallationVersionCheck"))
|
||||
.map(s -> !Boolean.parseBoolean(s))
|
||||
.orElse(true);
|
||||
isTest = isJUnitTest();
|
||||
}
|
||||
|
||||
private static boolean isJUnitTest() {
|
||||
for (StackTraceElement element : Thread.currentThread().getStackTrace()) {
|
||||
if (element.getClassName().startsWith("org.junit.")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void logSystemProperties() {
|
||||
|
|
|
@ -24,7 +24,7 @@ testing {
|
|||
systemProperty 'io.xpipe.app.fullVersion', "true"
|
||||
systemProperty 'io.xpipe.beacon.printDaemonOutput', "false"
|
||||
systemProperty 'io.xpipe.app.useVirtualThreads', "false"
|
||||
systemProperty "io.xpipe.beacon.port", "21725"
|
||||
// systemProperty "io.xpipe.beacon.port", "21725"
|
||||
systemProperty "io.xpipe.beacon.launchDebugDaemon", "true"
|
||||
systemProperty "io.xpipe.app.dataDir", "$projectDir/local/"
|
||||
systemProperty "io.xpipe.app.logLevel", "trace"
|
||||
|
|
Loading…
Reference in a new issue