From 77a5a7b41f5896e3f32c6fb858d71bae530e6591 Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 25 Jun 2023 14:47:37 +0100 Subject: [PATCH] Print test output when ran through Gradle --- build.gradle | 15 ++++++++++++++- .../standalone/CommandsIntegrationTest.java | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index cf81bd37e..c8431de6a 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,9 @@ plugins { alias(libs.plugins.licenser) apply false } +import org.gradle.api.tasks.testing.logging.TestExceptionFormat +import org.gradle.api.tasks.testing.logging.TestLogEvent + defaultTasks 'licenseFormat', 'build' subprojects { @@ -15,10 +18,20 @@ subprojects { sourceCompatibility = 1.8 targetCompatibility = 1.8 - tasks.withType(JavaCompile) { + tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' } + tasks.withType(Test).configureEach { + testLogging { + events = [TestLogEvent.PASSED, TestLogEvent.FAILED, TestLogEvent.SKIPPED] + exceptionFormat = TestExceptionFormat.FULL + showExceptions = true + showCauses = true + showStackTraces = true + } + } + jar { from '../LICENSE.txt' } diff --git a/standalone/src/test/java/me/lucko/luckperms/standalone/CommandsIntegrationTest.java b/standalone/src/test/java/me/lucko/luckperms/standalone/CommandsIntegrationTest.java index bd3e6f73e..419960465 100644 --- a/standalone/src/test/java/me/lucko/luckperms/standalone/CommandsIntegrationTest.java +++ b/standalone/src/test/java/me/lucko/luckperms/standalone/CommandsIntegrationTest.java @@ -1088,7 +1088,7 @@ public class CommandsIntegrationTest { .whenRunCommand("bulkupdate all update permission group.mod \"permission == group.moderator\"") .thenExpect("[LP] Running bulk update."); - assertTrue(completed.await(5, TimeUnit.SECONDS)); + assertTrue(completed.await(15, TimeUnit.SECONDS), "operation did not complete in the allotted time"); Group adminGroup = plugin.getGroupManager().getIfLoaded("admin"); assertNotNull(adminGroup);