Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions src/main/java/io/github/lambdatest/gradle/LambdaTestTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,23 @@ public void runLambdaTest() {
try {
if (appIdFuture != null) {
appId = appIdFuture.join();
if (!progressEnabled) {
logger.info("App uploaded successfully with ID: {}", appId);
}
}

if (testSuiteIdFuture != null) {
testSuiteId = testSuiteIdFuture.join();
if (!progressEnabled) {
logger.info("Test suite uploaded successfully with ID: {}", testSuiteId);
}
}

// Clear progress display if enabled
// Clear progress display if enabled, then show success messages
if (progressEnabled) {
ProgressTracker.cleanup();
// Show success messages after progress cleanup
if (appIdFuture != null) {
logger.info("App uploaded successfully with ID: {}", appId);
}
if (testSuiteIdFuture != null) {
logger.info("Test suite uploaded successfully with ID: {}", testSuiteId);
}
}

// Show success messages (unified flow for both progress and non-progress cases)
if (appIdFuture != null) {
logger.info("App uploaded successfully with ID: {}", appId);
}
if (testSuiteIdFuture != null) {
logger.info("Test suite uploaded successfully with ID: {}", testSuiteId);
}
} catch (CompletionException e) {
// Cleanup progress display on error
Expand Down
31 changes: 11 additions & 20 deletions src/main/java/io/github/lambdatest/gradle/LambdaUploaderTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,34 +59,25 @@ public void uploadApkToLambdaTest() {
try {
if (appIdFuture != null) {
appId = appIdFuture.join();
if (!progressEnabled) {
logger.lifecycle(
"\u001B[32mApp uploaded successfully with ID: {}\u001B[0m", appId);
}
}

if (testSuiteIdFuture != null) {
testSuiteId = testSuiteIdFuture.join();
if (!progressEnabled) {
logger.lifecycle(
"\u001B[32mTest suite uploaded successfully with ID: {}\u001B[0m",
testSuiteId);
}
}

// Clear progress display if enabled
// Clear progress display if enabled, then show success messages
if (progressEnabled) {
ProgressTracker.cleanup();
// Show success messages after progress cleanup
if (appIdFuture != null) {
logger.lifecycle(
"\u001B[32mApp uploaded successfully with ID: {}\u001B[0m", appId);
}
if (testSuiteIdFuture != null) {
logger.lifecycle(
"\u001B[32mTest suite uploaded successfully with ID: {}\u001B[0m",
testSuiteId);
}
}

// Show success messages (unified flow for both progress and non-progress cases)
if (appIdFuture != null) {
logger.lifecycle("\u001B[32mApp uploaded successfully with ID: {}\u001B[0m", appId);
}
if (testSuiteIdFuture != null) {
logger.lifecycle(
"\u001B[32mTest suite uploaded successfully with ID: {}\u001B[0m",
testSuiteId);
}
} catch (CompletionException e) {
// Cleanup progress display on error
Expand Down
Loading