diff --git a/build.gradle b/build.gradle index e575a1af4..64b9aa41d 100644 --- a/build.gradle +++ b/build.gradle @@ -252,7 +252,6 @@ testing { dependencies { implementation project() implementation(sourceSets.test.output) - implementation('org.apache.commons:commons-lang3:3.22.0') } targets.configureEach { diff --git a/src/e2eAndroidTest/java/io/appium/java_client/android/AndroidLogcatListenerTest.java b/src/e2eAndroidTest/java/io/appium/java_client/android/AndroidLogcatListenerTest.java index 618da2e32..c815abad5 100644 --- a/src/e2eAndroidTest/java/io/appium/java_client/android/AndroidLogcatListenerTest.java +++ b/src/e2eAndroidTest/java/io/appium/java_client/android/AndroidLogcatListenerTest.java @@ -1,6 +1,5 @@ package io.appium.java_client.android; -import org.apache.commons.lang3.time.DurationFormatUtils; import org.junit.jupiter.api.Test; import java.time.Duration; @@ -26,8 +25,8 @@ public void verifyLogcatListenerCanBeAssigned() { // This is needed for pushing some internal log messages driver.runAppInBackground(Duration.ofSeconds(1)); assertTrue(messageSemaphore.tryAcquire(timeout.toMillis(), TimeUnit.MILLISECONDS), - String.format("Didn't receive any log message after %s timeout", - DurationFormatUtils.formatDuration(timeout.toMillis(), "H:mm:ss", true))); + String.format("Didn't receive any log message after %d:%02d:%02d timeout", + timeout.toHours(), timeout.toMinutesPart(), timeout.toSecondsPart())); } catch (InterruptedException e) { throw new IllegalStateException(e); } finally { diff --git a/src/e2eIosTest/java/io/appium/java_client/ios/IOSAlertTest.java b/src/e2eIosTest/java/io/appium/java_client/ios/IOSAlertTest.java index eea8899b5..0e70deecb 100644 --- a/src/e2eIosTest/java/io/appium/java_client/ios/IOSAlertTest.java +++ b/src/e2eIosTest/java/io/appium/java_client/ios/IOSAlertTest.java @@ -16,7 +16,6 @@ package io.appium.java_client.ios; -import org.apache.commons.lang3.StringUtils; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Test; @@ -70,7 +69,7 @@ public void dismissAlertTest() { @Test public void getAlertTextTest() { ensureAlertPresence(); - assertFalse(StringUtils.isBlank(driver.switchTo().alert().getText())); + assertFalse(driver.switchTo().alert().getText().isBlank()); } private void ensureAlertPresence() { diff --git a/src/e2eIosTest/java/io/appium/java_client/ios/IOSSyslogListenerTest.java b/src/e2eIosTest/java/io/appium/java_client/ios/IOSSyslogListenerTest.java index b2c4c96bd..f71f234f7 100644 --- a/src/e2eIosTest/java/io/appium/java_client/ios/IOSSyslogListenerTest.java +++ b/src/e2eIosTest/java/io/appium/java_client/ios/IOSSyslogListenerTest.java @@ -1,6 +1,5 @@ package io.appium.java_client.ios; -import org.apache.commons.lang3.time.DurationFormatUtils; import org.junit.jupiter.api.Test; import java.time.Duration; @@ -26,8 +25,8 @@ public void verifySyslogListenerCanBeAssigned() { // This is needed for pushing some internal log messages driver.runAppInBackground(Duration.ofSeconds(1)); assertTrue(messageSemaphore.tryAcquire(timeout.toMillis(), TimeUnit.MILLISECONDS), - String.format("Didn't receive any log message after %s timeout", - DurationFormatUtils.formatDuration(timeout.toMillis(), "H:mm:ss", true))); + String.format("Didn't receive any log message after %d:%02d:%02d timeout", + timeout.toHours(), timeout.toMinutesPart(), timeout.toSecondsPart())); } catch (InterruptedException e) { throw new IllegalStateException(e); } finally {