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
5 changes: 0 additions & 5 deletions hadoop-common-project/hadoop-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@
<artifactId>hadoop-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions hadoop-common-project/hadoop-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@
<artifactId>reload4j</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.nio.charset.StandardCharsets;

import org.assertj.core.api.Assertions;
import org.junit.Assume;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -34,6 +33,7 @@

import static org.apache.hadoop.fs.CommonPathCapabilities.ETAGS_AVAILABLE;
import static org.apache.hadoop.fs.CommonPathCapabilities.ETAGS_PRESERVED_IN_RENAME;
import static org.assertj.core.api.Assumptions.assumeThat;

/**
* For filesystems which support etags, validate correctness
Expand Down Expand Up @@ -132,9 +132,9 @@ public void testEtagConsistencyAcrossRename() throws Throwable {
describe("Verify that when a file is renamed, the etag remains unchanged");
final Path path = methodPath();
final FileSystem fs = getFileSystem();
Assume.assumeTrue(
"Filesystem does not declare that etags are preserved across renames",
fs.hasPathCapability(path, ETAGS_PRESERVED_IN_RENAME));
assumeThat(fs.hasPathCapability(path, ETAGS_PRESERVED_IN_RENAME))
.withFailMessage("Filesystem does not declare that etags are preserved across renames")
.isTrue();
Path src = new Path(path, "src");
Path dest = new Path(path, "dest");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

package org.apache.hadoop.fs.contract.rawlocal;

import org.junit.Assume;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.contract.AbstractContractAppendTest;
import org.apache.hadoop.fs.contract.AbstractFSContract;

import static org.assertj.core.api.Assumptions.assumeThat;

public class TestRawlocalContractAppend extends AbstractContractAppendTest {

@Override
Expand All @@ -36,7 +36,7 @@ protected AbstractFSContract createContract(Configuration conf) {
public void testRenameFileBeingAppended() throws Throwable {
// Renaming a file while its handle is open is not supported on Windows.
// Thus, this test should be skipped on Windows.
Assume.assumeFalse(Path.WINDOWS);
assumeThat(Path.WINDOWS).isFalse();

super.testRenameFileBeingAppended();
}
Expand Down
5 changes: 0 additions & 5 deletions hadoop-common-project/hadoop-kms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@
<artifactId>hadoop-minikdc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ public void testAggregation() throws Exception {
kmsAudit.evictCacheForTesting();
String out = getAndResetLogOutput();
System.out.println(out);
boolean doesMatch = out.matches(
String cleanedOut =
out.replaceAll("fs\\.default\\.name in core-default\\.xml is deprecated\\. " +
"Instead, use fs\\.defaultFS", "");
boolean doesMatch = cleanedOut.matches(
"OK\\[op=DECRYPT_EEK, key=k1, user=luser@REALM, accessCount=1, "
+ "interval=[^m]{1,4}ms\\] testmsg"
// Not aggregated !!
Expand Down Expand Up @@ -156,11 +159,14 @@ public void testAggregationUnauth() throws Exception {
kmsAudit.evictCacheForTesting();
String out = getAndResetLogOutput();
System.out.println(out);
String cleanedOut =
out.replaceAll("fs\\.default\\.name in core-default\\.xml is deprecated\\. " +
"Instead, use fs\\.defaultFS", "");

// The UNAUTHORIZED will trigger cache invalidation, which then triggers
// the aggregated OK (accessCount=5). But the order of the UNAUTHORIZED and
// the aggregated OK is arbitrary - no correctness concerns, but flaky here.
boolean doesMatch = out.matches(
boolean doesMatch = cleanedOut.matches(
"UNAUTHORIZED\\[op=GENERATE_EEK, key=k2, user=luser@REALM\\] "
+ "OK\\[op=GENERATE_EEK, key=k3, user=luser@REALM, accessCount=1,"
+ " interval=[^m]{1,4}ms\\] testmsg"
Expand All @@ -169,7 +175,7 @@ public void testAggregationUnauth() throws Exception {
+ "UNAUTHORIZED\\[op=GENERATE_EEK, key=k3, user=luser@REALM\\] "
+ "OK\\[op=GENERATE_EEK, key=k3, user=luser@REALM, accessCount=1,"
+ " interval=[^m]{1,4}ms\\] testmsg");
doesMatch = doesMatch || out.matches(
doesMatch = doesMatch || cleanedOut.matches(
"UNAUTHORIZED\\[op=GENERATE_EEK, key=k2, user=luser@REALM\\] "
+ "OK\\[op=GENERATE_EEK, key=k3, user=luser@REALM, accessCount=1,"
+ " interval=[^m]{1,4}ms\\] testmsg"
Expand Down
5 changes: 0 additions & 5 deletions hadoop-common-project/hadoop-minikdc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,6 @@
<artifactId>junit-jupiter-engine</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
Expand Down
30 changes: 25 additions & 5 deletions hadoop-common-project/hadoop-nfs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@
<scope>test</scope>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
Expand Down Expand Up @@ -97,6 +92,31 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down
Loading