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
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
import org.apache.hadoop.security.authorize.AuthorizationException;
import org.apache.hadoop.security.authorize.ImpersonationProvider;
import org.jline.utils.Log;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.HADOOP_SECURITY_IMPERSONATION_PROVIDER_CLASS;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;


/** Tests for {@link WorkloadDriver} and related classes. */
Expand All @@ -61,7 +61,7 @@ public class TestWorkloadGenerator {
private MiniDFSCluster miniCluster;
private FileSystem dfs;

@Before
@BeforeEach
public void setup() throws Exception {
conf = new Configuration();
conf.setClass(HADOOP_SECURITY_IMPERSONATION_PROVIDER_CLASS,
Expand All @@ -74,7 +74,7 @@ public void setup() throws Exception {
dfs.setOwner(new Path("/tmp"), "hdfs", "hdfs");
}

@After
@AfterEach
public void tearDown() throws Exception {
if (miniCluster != null) {
miniCluster.shutdown();
Expand Down Expand Up @@ -135,7 +135,7 @@ private void testAuditWorkloadWithOutput(String auditOutputPath)
Job workloadJob = WorkloadDriver.getJobForSubmission(conf,
dfs.getUri().toString(), workloadStartTime, AuditReplayMapper.class);
boolean success = workloadJob.waitForCompletion(true);
assertTrue("workload job should succeed", success);
assertTrue(success, "workload job should succeed");
Counters counters = workloadJob.getCounters();
assertEquals(6,
counters.findCounter(AuditReplayMapper.REPLAYCOUNTERS.TOTALCOMMANDS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
import java.util.function.Function;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.Text;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

/** Tests for {@link AuditLogDirectParser}. */
public class TestAuditLogDirectParser {
Expand All @@ -32,7 +32,7 @@ public class TestAuditLogDirectParser {
private AuditLogDirectParser parser;
private Long sequence = 1L;

@Before
@BeforeEach
public void setup() throws Exception {
parser = new AuditLogDirectParser();
Configuration conf = new Configuration();
Expand Down