Skip to content

Commit d75a5a7

Browse files
committed
HADOOP-19425. Fix CheckStyle.
1 parent f88fb9f commit d75a5a7

File tree

9 files changed

+26
-24
lines changed

9 files changed

+26
-24
lines changed

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/AbstractAbfsScaleTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ public AbstractAbfsScaleTest() throws Exception {
4444
super();
4545
}
4646

47+
@Override
48+
protected int getTestTimeoutMillis() {
49+
return AzureTestConstants.SCALE_TEST_TIMEOUT_MILLIS;
50+
}
51+
4752
@Override
4853
public void setup() throws Exception {
4954
super.setup();

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsIdentityTransformer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,9 @@ public void testIdentityReplacementForSuperUserGetRequest() throws IOException {
158158
// Disable $supeuser replacement
159159
config.setBoolean(FS_AZURE_SKIP_SUPER_USER_REPLACEMENT, true);
160160
identityTransformer = getTransformerWithCustomizedIdentityConfig(config);
161-
assertEquals(
162-
SUPER_USER, identityTransformer.transformIdentityForGetRequest(SUPER_USER, true, localUser), "$superuser should not be replaced");
161+
assertEquals(SUPER_USER,
162+
identityTransformer.transformIdentityForGetRequest(SUPER_USER, true, localUser),
163+
"$superuser should not be replaced");
163164
}
164165

165166
@Test

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsListStatusRemoteIterator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
import static org.mockito.Mockito.spy;
5252
import static org.mockito.Mockito.verify;
5353

54-
5554
/**
5655
* Test ListStatusRemoteIterator operation.
5756
*/

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemLease.java

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.io.IOException;
2121
import java.util.concurrent.Callable;
2222
import java.util.concurrent.RejectedExecutionException;
23+
import java.util.concurrent.TimeUnit;
2324

2425
import org.junit.jupiter.api.Test;
2526

@@ -65,8 +66,8 @@
6566
* Test lease operations.
6667
*/
6768
public class ITestAzureBlobFileSystemLease extends AbstractAbfsIntegrationTest {
68-
private static final int TEST_EXECUTION_TIMEOUT = 30;
69-
private static final int LONG_TEST_EXECUTION_TIMEOUT = 90;
69+
private static final int TEST_EXECUTION_TIMEOUT = 30 * 1000;
70+
private static final int LONG_TEST_EXECUTION_TIMEOUT = 90 * 1000;
7071
private static final String TEST_FILE = "testfile";
7172
private final boolean isHNSEnabled;
7273
private static final int TEST_BYTES = 20;
@@ -88,7 +89,7 @@ private AzureBlobFileSystem getCustomFileSystem(Path infiniteLeaseDirs, int numL
8889
}
8990

9091
@Test
91-
@Timeout(TEST_EXECUTION_TIMEOUT)
92+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
9293
public void testNoInfiniteLease() throws IOException {
9394
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
9495
final AzureBlobFileSystem fs = getFileSystem();
@@ -101,7 +102,7 @@ public void testNoInfiniteLease() throws IOException {
101102
}
102103

103104
@Test
104-
@Timeout(TEST_EXECUTION_TIMEOUT)
105+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
105106
public void testNoLeaseThreads() throws Exception {
106107
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
107108
final AzureBlobFileSystem fs = getCustomFileSystem(testFilePath.getParent(), 0);
@@ -114,7 +115,7 @@ public void testNoLeaseThreads() throws Exception {
114115
}
115116

116117
@Test
117-
@Timeout(TEST_EXECUTION_TIMEOUT)
118+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
118119
public void testOneWriter() throws Exception {
119120
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
120121
final AzureBlobFileSystem fs = getCustomFileSystem(testFilePath.getParent(), 1);
@@ -130,7 +131,7 @@ public void testOneWriter() throws Exception {
130131
}
131132

132133
@Test
133-
@Timeout(TEST_EXECUTION_TIMEOUT)
134+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
134135
public void testSubDir() throws Exception {
135136
final Path testFilePath = new Path(new Path(path(methodName.getMethodName()), "subdir"),
136137
TEST_FILE);
@@ -148,7 +149,7 @@ public void testSubDir() throws Exception {
148149
}
149150

150151
@Test
151-
@Timeout(TEST_EXECUTION_TIMEOUT)
152+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
152153
public void testTwoCreate() throws Exception {
153154
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
154155
final AzureBlobFileSystem fs = getCustomFileSystem(testFilePath.getParent(), 1);
@@ -207,7 +208,7 @@ private void twoWriters(AzureBlobFileSystem fs, Path testFilePath, boolean expec
207208
}
208209

209210
@Test
210-
@Timeout(TEST_EXECUTION_TIMEOUT)
211+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
211212
public void testTwoWritersCreateAppendNoInfiniteLease() throws Exception {
212213
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
213214
final AzureBlobFileSystem fs = getFileSystem();
@@ -218,7 +219,7 @@ public void testTwoWritersCreateAppendNoInfiniteLease() throws Exception {
218219
}
219220

220221
@Test
221-
@Timeout(LONG_TEST_EXECUTION_TIMEOUT)
222+
@Timeout(value = LONG_TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
222223
public void testTwoWritersCreateAppendWithInfiniteLeaseEnabled() throws Exception {
223224
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
224225
final AzureBlobFileSystem fs = getCustomFileSystem(testFilePath.getParent(), 1);
@@ -229,7 +230,7 @@ public void testTwoWritersCreateAppendWithInfiniteLeaseEnabled() throws Exceptio
229230
}
230231

231232
@Test
232-
@Timeout(TEST_EXECUTION_TIMEOUT)
233+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
233234
public void testLeaseFreedOnClose() throws Exception {
234235
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
235236
final AzureBlobFileSystem fs = getCustomFileSystem(testFilePath.getParent(), 1);
@@ -247,7 +248,7 @@ public void testLeaseFreedOnClose() throws Exception {
247248
}
248249

249250
@Test
250-
@Timeout(TEST_EXECUTION_TIMEOUT)
251+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
251252
public void testWriteAfterBreakLease() throws Exception {
252253
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
253254
final AzureBlobFileSystem fs = getCustomFileSystem(testFilePath.getParent(), 1);
@@ -292,7 +293,7 @@ public void testWriteAfterBreakLease() throws Exception {
292293
}
293294

294295
@Test
295-
@Timeout(LONG_TEST_EXECUTION_TIMEOUT)
296+
@Timeout(value = LONG_TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
296297
public void testLeaseFreedAfterBreak() throws Exception {
297298
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
298299
final AzureBlobFileSystem fs = getCustomFileSystem(testFilePath.getParent(), 1);
@@ -316,7 +317,7 @@ public void testLeaseFreedAfterBreak() throws Exception {
316317
}
317318

318319
@Test
319-
@Timeout(TEST_EXECUTION_TIMEOUT)
320+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
320321
public void testInfiniteLease() throws Exception {
321322
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
322323
final AzureBlobFileSystem fs = getCustomFileSystem(testFilePath.getParent(), 1);
@@ -338,7 +339,7 @@ public void testInfiniteLease() throws Exception {
338339
}
339340

340341
@Test
341-
@Timeout(TEST_EXECUTION_TIMEOUT)
342+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
342343
public void testFileSystemClose() throws Exception {
343344
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
344345
final AzureBlobFileSystem fs = getCustomFileSystem(testFilePath.getParent(), 1);
@@ -377,7 +378,7 @@ public void testFileSystemClose() throws Exception {
377378
}
378379

379380
@Test
380-
@Timeout(TEST_EXECUTION_TIMEOUT)
381+
@Timeout(value = TEST_EXECUTION_TIMEOUT, unit = TimeUnit.MILLISECONDS)
381382
public void testAcquireRetry() throws Exception {
382383
final Path testFilePath = new Path(path(methodName.getMethodName()), TEST_FILE);
383384
final AzureBlobFileSystem fs = getCustomFileSystem(testFilePath.getParent(), 1);

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/TestAbfsCrc64.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@
1818
package org.apache.hadoop.fs.azurebfs;
1919

2020
import static org.junit.jupiter.api.Assertions.assertEquals;
21-
2221
import org.junit.jupiter.api.Test;
2322

2423
import org.apache.hadoop.fs.azurebfs.utils.CRC64;
25-
2624
/**
2725
* Test for Crc64 in AzureBlobFileSystem, notice that ABFS CRC64 has its own polynomial.
2826
* */

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/extensions/TestCustomOauthTokenProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ public void testCustomProviderBinding() throws Throwable {
7272
"date wrong: " + expiry);
7373
// once closed, the UA state changes.
7474
provider.close();
75-
assertEquals( CLOSED, provider.getUserAgentSuffix(), "User agent");
75+
assertEquals(CLOSED, provider.getUserAgentSuffix(), "User agent");
7676
}
7777
}

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/extensions/TestDTManagerLifecycle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import org.junit.jupiter.api.AfterEach;
2424
import org.junit.jupiter.api.BeforeEach;
25-
import org.junit.jupiter.api.Test;
25+
import org.junit.jupiter.api.Test;
2626

2727
import org.apache.hadoop.conf.Configuration;
2828
import org.apache.hadoop.fs.azurebfs.AbstractAbfsTestWithTimeout;

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestApacheClientConnectionPool.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import static org.apache.hadoop.fs.azurebfs.constants.FileSystemConfigurations.DEFAULT_HTTP_CLIENT_CONN_MAX_IDLE_TIME;
4242
import static org.apache.hadoop.fs.azurebfs.constants.FileSystemConfigurations.HUNDRED;
4343
import static org.apache.hadoop.test.LambdaTestUtils.intercept;
44-
import static org.assertj.core.api.Assertions.assertThat;
4544

4645
public class TestApacheClientConnectionPool extends
4746
AbstractAbfsTestWithTimeout {

hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestListActionTaker.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import static org.apache.hadoop.fs.azurebfs.constants.FileSystemConfigurations.DEFAULT_AZURE_LIST_MAX_RESULTS;
3939
import static org.apache.hadoop.fs.azurebfs.constants.FileSystemConfigurations.DEFAULT_FS_AZURE_LISTING_ACTION_THREADS;
4040
import static org.apache.hadoop.fs.azurebfs.constants.FileSystemConfigurations.DEFAULT_FS_AZURE_PRODUCER_QUEUE_MAX_SIZE;
41-
import static org.assertj.core.api.Assertions.assertThat;
4241

4342
public class TestListActionTaker extends AbstractAbfsTestWithTimeout {
4443

0 commit comments

Comments
 (0)