Skip to content

Commit fe0cb92

Browse files
authored
Merge branch 'main' into unit-tests
2 parents 3183306 + c859e2e commit fe0cb92

File tree

2 files changed

+20
-34
lines changed

2 files changed

+20
-34
lines changed

src/main/java/io/github/lambdatest/gradle/LambdaTestTask.java

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,28 +91,23 @@ public void runLambdaTest() {
9191
try {
9292
if (appIdFuture != null) {
9393
appId = appIdFuture.join();
94-
if (!progressEnabled) {
95-
logger.info("App uploaded successfully with ID: {}", appId);
96-
}
9794
}
9895

9996
if (testSuiteIdFuture != null) {
10097
testSuiteId = testSuiteIdFuture.join();
101-
if (!progressEnabled) {
102-
logger.info("Test suite uploaded successfully with ID: {}", testSuiteId);
103-
}
10498
}
10599

106-
// Clear progress display if enabled
100+
// Clear progress display if enabled, then show success messages
107101
if (progressEnabled) {
108102
ProgressTracker.cleanup();
109-
// Show success messages after progress cleanup
110-
if (appIdFuture != null) {
111-
logger.info("App uploaded successfully with ID: {}", appId);
112-
}
113-
if (testSuiteIdFuture != null) {
114-
logger.info("Test suite uploaded successfully with ID: {}", testSuiteId);
115-
}
103+
}
104+
105+
// Show success messages (unified flow for both progress and non-progress cases)
106+
if (appIdFuture != null) {
107+
logger.info("App uploaded successfully with ID: {}", appId);
108+
}
109+
if (testSuiteIdFuture != null) {
110+
logger.info("Test suite uploaded successfully with ID: {}", testSuiteId);
116111
}
117112
} catch (CompletionException e) {
118113
// Cleanup progress display on error

src/main/java/io/github/lambdatest/gradle/LambdaUploaderTask.java

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,34 +59,25 @@ public void uploadApkToLambdaTest() {
5959
try {
6060
if (appIdFuture != null) {
6161
appId = appIdFuture.join();
62-
if (!progressEnabled) {
63-
logger.lifecycle(
64-
"\u001B[32mApp uploaded successfully with ID: {}\u001B[0m", appId);
65-
}
6662
}
6763

6864
if (testSuiteIdFuture != null) {
6965
testSuiteId = testSuiteIdFuture.join();
70-
if (!progressEnabled) {
71-
logger.lifecycle(
72-
"\u001B[32mTest suite uploaded successfully with ID: {}\u001B[0m",
73-
testSuiteId);
74-
}
7566
}
7667

77-
// Clear progress display if enabled
68+
// Clear progress display if enabled, then show success messages
7869
if (progressEnabled) {
7970
ProgressTracker.cleanup();
80-
// Show success messages after progress cleanup
81-
if (appIdFuture != null) {
82-
logger.lifecycle(
83-
"\u001B[32mApp uploaded successfully with ID: {}\u001B[0m", appId);
84-
}
85-
if (testSuiteIdFuture != null) {
86-
logger.lifecycle(
87-
"\u001B[32mTest suite uploaded successfully with ID: {}\u001B[0m",
88-
testSuiteId);
89-
}
71+
}
72+
73+
// Show success messages (unified flow for both progress and non-progress cases)
74+
if (appIdFuture != null) {
75+
logger.lifecycle("\u001B[32mApp uploaded successfully with ID: {}\u001B[0m", appId);
76+
}
77+
if (testSuiteIdFuture != null) {
78+
logger.lifecycle(
79+
"\u001B[32mTest suite uploaded successfully with ID: {}\u001B[0m",
80+
testSuiteId);
9081
}
9182
} catch (CompletionException e) {
9283
// Cleanup progress display on error

0 commit comments

Comments
 (0)