You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/06/08 17:55:01 UTC

[GitHub] [hadoop] steveloughran commented on a diff in pull request #4349: HDFS-16590. Fix Junit Test Deprecated assertThat

steveloughran commented on code in PR #4349:
URL: https://github.com/apache/hadoop/pull/4349#discussion_r892689794


##########
hadoop-project/pom.xml:
##########
@@ -169,7 +169,7 @@
     <enforced.maven.version>[3.3.0,)</enforced.maven.version>
 
     <!-- Plugin versions and config -->
-    <maven-surefire-plugin.argLine>-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError</maven-surefire-plugin.argLine>
+    <maven-surefire-plugin.argLine>-Xmx8192m -XX:+HeapDumpOnOutOfMemoryError</maven-surefire-plugin.argLine>

Review Comment:
   maven turning must be in separate PRs



##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/AbstractAbfsTestWithTimeout.java:
##########
@@ -126,4 +128,19 @@ protected boolean validateContent(AzureBlobFileSystem fs, Path path,
 
   }
 
+  /**
+   * Override assertThat introduced by extending JUnit Assertions in base test class.
+   * If extending Assertions is removed, we can eliminate this method and import directly.
+   *
+   * @param reason additional information about the error.
+   * @param actual the computed value being compared.
+   * @param matcher an expression, built of Matchers, specifying allowed values.
+   * @param <T> the static type accepted by the matcher
+   * (this can flag obvious compile-time problems such as assertThat(1, is("a"))
+   */
+  @SuppressWarnings("deprecation")
+  public static <T> void assertThat(String reason, T actual, Matcher<? super T> matcher) {

Review Comment:
   leave abfs out, and I'm -1 to the change here entirely



##########
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/commit/magic/ITestMagicCommitProtocol.java:
##########
@@ -25,7 +25,6 @@
 import org.assertj.core.api.Assertions;
 import org.junit.Test;
 
-import org.apache.hadoop.conf.Configuration;

Review Comment:
   leave this out of the patch. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org