@@ -327,12 +327,11 @@ public void testRenameNotFoundBlobToEmptyRoot() throws Exception {
327
327
@ Test
328
328
public void testRenameBlobToDstWithColonInSourcePath () throws Exception {
329
329
AzureBlobFileSystem fs = getFileSystem ();
330
- assumeBlobServiceType ();
331
330
fs .create (new Path ("/src:/file" ));
332
331
Assertions .assertThat (
333
- fs .rename (new Path ("/src:" ),
334
- new Path ( "/dst" ) )
335
- ) .isTrue ();
332
+ fs .rename (new Path ("/src:" ), new Path ( "/dst" )))
333
+ . describedAs ( "Rename should succeed" )
334
+ .isTrue ();
336
335
}
337
336
338
337
/**
@@ -349,9 +348,9 @@ public void testRenameWithColonInDestinationPath() throws Exception {
349
348
AzureBlobFileSystem fs = getFileSystem ();
350
349
fs .create (new Path ("/src" ));
351
350
Assertions .assertThat (
352
- fs .rename (new Path ("/src" ),
353
- new Path ( "/dst:" ) )
354
- ) .isTrue ();
351
+ fs .rename (new Path ("/src" ), new Path ( "/dst:" )))
352
+ . describedAs ( "Rename should succeed" )
353
+ .isTrue ();
355
354
}
356
355
357
356
@ Test
@@ -364,26 +363,29 @@ public void testRenameWithColonInSourcePath() throws Exception {
364
363
fs .create (new Path (sourceDirectory + "/Test:" , fileName ));
365
364
// Rename from source to destination
366
365
Assertions .assertThat (
367
- fs .rename (new Path (sourceDirectory ),
368
- new Path ( destinationDirectory ) )
369
- ) .isTrue ();
366
+ fs .rename (new Path (sourceDirectory ), new Path ( destinationDirectory )))
367
+ . describedAs ( "Rename should succeed" )
368
+ .isTrue ();
370
369
Assertions .assertThat (
371
- fs .exists (new Path (sourceDirectory , fileName )))
370
+ fs .exists (new Path (sourceDirectory , fileName )))
371
+ .describedAs ("Source directory should not exist after rename" )
372
372
.isFalse ();
373
373
Assertions .assertThat (
374
374
fs .exists (new Path (destinationDirectory , fileName )))
375
+ .describedAs ("Destination directory should exist after rename" )
375
376
.isTrue ();
376
377
377
378
// Rename from destination to source
378
379
Assertions .assertThat (
379
- fs .rename (new Path (destinationDirectory ),
380
- new Path (sourceDirectory ))
381
- ).isTrue ();
380
+ fs .rename (new Path (destinationDirectory ), new Path (sourceDirectory )))
381
+ .describedAs ("Rename should succeed" ).isTrue ();
382
382
Assertions .assertThat (
383
383
fs .exists (new Path (sourceDirectory , fileName )))
384
+ .describedAs ("Destination directory should exist after rename" )
384
385
.isTrue ();
385
386
Assertions .assertThat (
386
387
fs .exists (new Path (destinationDirectory , fileName )))
388
+ .describedAs ("Source directory should not exist after rename" )
387
389
.isFalse ();
388
390
}
389
391
@@ -1793,7 +1795,7 @@ private void validateRename(AzureBlobFileSystem fs, Path src, Path dst,
1793
1795
* Test the renaming of a directory with different parallelism configurations.
1794
1796
*/
1795
1797
@ Test
1796
- public void testRenameDirWithDifferentParallelism () throws Exception {
1798
+ public void testRenameDirWithDifferentParallelismConfig () throws Exception {
1797
1799
try (AzureBlobFileSystem currentFs = getFileSystem ()) {
1798
1800
assumeBlobServiceType ();
1799
1801
Path src = new Path ("/hbase/A1/A2" );
@@ -2073,7 +2075,8 @@ private void validateAtomicRenameKey(AbfsBlobClient abfsBlobClient, String path,
2073
2075
* @return file system
2074
2076
* @throws IOException in case of failure
2075
2077
*/
2076
- public AzureBlobFileSystem createJsonFile (Path path , Path renameJson ) throws IOException {
2078
+ public AzureBlobFileSystem createJsonFile (Path path , Path renameJson )
2079
+ throws IOException {
2077
2080
final AzureBlobFileSystem fs = Mockito .spy (this .getFileSystem ());
2078
2081
assumeBlobServiceType ();
2079
2082
AzureBlobFileSystemStore store = Mockito .spy (fs .getAbfsStore ());
@@ -2084,9 +2087,12 @@ public AzureBlobFileSystem createJsonFile(Path path, Path renameJson) throws IOE
2084
2087
fs .setWorkingDirectory (new Path (ROOT_PATH ));
2085
2088
fs .create (new Path (path , "file.txt" ));
2086
2089
2087
- AzureBlobFileSystemStore .VersionedFileStatus fileStatus = (AzureBlobFileSystemStore .VersionedFileStatus ) fs .getFileStatus (path );
2090
+ AzureBlobFileSystemStore .VersionedFileStatus fileStatus
2091
+ = (AzureBlobFileSystemStore .VersionedFileStatus ) fs .getFileStatus (path );
2088
2092
2089
- new RenameAtomicity (path , new Path ("/hbase/test4" ), renameJson , getTestTracingContext (fs , true ), fileStatus .getEtag (), client )
2093
+ new RenameAtomicity (path , new Path ("/hbase/test4" ),
2094
+ renameJson , getTestTracingContext (fs , true ),
2095
+ fileStatus .getEtag (), client )
2090
2096
.preRename ();
2091
2097
2092
2098
Assertions .assertThat (fs .exists (renameJson ))
@@ -2106,7 +2112,7 @@ public AzureBlobFileSystem createJsonFile(Path path, Path renameJson) throws IOE
2106
2112
* @throws Exception if any error occurs during the test execution
2107
2113
*/
2108
2114
@ Test
2109
- public void listCrashRecoveryWithSingleChildFolder () throws Exception {
2115
+ public void testListCrashRecoveryWithSingleChildFolder () throws Exception {
2110
2116
AzureBlobFileSystem fs = null ;
2111
2117
try {
2112
2118
Path path = new Path ("/hbase/A1/A2" );
@@ -2135,7 +2141,7 @@ public void listCrashRecoveryWithSingleChildFolder() throws Exception {
2135
2141
* @throws Exception if any error occurs during the test execution
2136
2142
*/
2137
2143
@ Test
2138
- public void listCrashRecoveryWithMultipleChildFolder () throws Exception {
2144
+ public void testListCrashRecoveryWithMultipleChildFolder () throws Exception {
2139
2145
AzureBlobFileSystem fs = null ;
2140
2146
try {
2141
2147
Path path = new Path ("/hbase/A1/A2" );
@@ -2167,7 +2173,7 @@ public void listCrashRecoveryWithMultipleChildFolder() throws Exception {
2167
2173
* @throws Exception if any error occurs during the test execution
2168
2174
*/
2169
2175
@ Test
2170
- public void listCrashRecoveryWithPendingJsonFile () throws Exception {
2176
+ public void testListCrashRecoveryWithPendingJsonFile () throws Exception {
2171
2177
AzureBlobFileSystem fs = null ;
2172
2178
try {
2173
2179
Path path = new Path ("/hbase/A1/A2" );
@@ -2200,7 +2206,7 @@ public void listCrashRecoveryWithPendingJsonFile() throws Exception {
2200
2206
* @throws Exception if any error occurs during the test execution
2201
2207
*/
2202
2208
@ Test
2203
- public void listCrashRecoveryWithoutAnyPendingJsonFile () throws Exception {
2209
+ public void testListCrashRecoveryWithoutAnyPendingJsonFile () throws Exception {
2204
2210
AzureBlobFileSystem fs = null ;
2205
2211
try {
2206
2212
Path path = new Path ("/hbase/A1/A2" );
@@ -2233,7 +2239,7 @@ public void listCrashRecoveryWithoutAnyPendingJsonFile() throws Exception {
2233
2239
* @throws Exception if any error occurs during the test execution
2234
2240
*/
2235
2241
@ Test
2236
- public void listCrashRecoveryWithPendingJsonDir () throws Exception {
2242
+ public void testListCrashRecoveryWithPendingJsonDir () throws Exception {
2237
2243
try (AzureBlobFileSystem fs = Mockito .spy (this .getFileSystem ())) {
2238
2244
assumeBlobServiceType ();
2239
2245
AbfsBlobClient client = (AbfsBlobClient ) addSpyHooksOnClient (fs );
@@ -2280,7 +2286,7 @@ public void listCrashRecoveryWithPendingJsonDir() throws Exception {
2280
2286
* @throws Exception if any error occurs during the test execution
2281
2287
*/
2282
2288
@ Test
2283
- public void listCrashRecoveryWithMultipleJsonFile () throws Exception {
2289
+ public void testListCrashRecoveryWithMultipleJsonFile () throws Exception {
2284
2290
AzureBlobFileSystem fs = null ;
2285
2291
try {
2286
2292
Path path = new Path ("/hbase/A1/A2" );
@@ -2295,9 +2301,12 @@ public void listCrashRecoveryWithMultipleJsonFile() throws Exception {
2295
2301
fs .create (new Path (path2 , "file3.txt" ));
2296
2302
2297
2303
Path renameJson2 = new Path (path2 .getParent (), path2 .getName () + SUFFIX );
2298
- AzureBlobFileSystemStore .VersionedFileStatus fileStatus = (AzureBlobFileSystemStore .VersionedFileStatus ) fs .getFileStatus (path2 );
2304
+ AzureBlobFileSystemStore .VersionedFileStatus fileStatus
2305
+ = (AzureBlobFileSystemStore .VersionedFileStatus ) fs .getFileStatus (path2 );
2299
2306
2300
- new RenameAtomicity (path2 , new Path ("/hbase/test4" ), renameJson2 , getTestTracingContext (fs , true ), fileStatus .getEtag (), client ).preRename ();
2307
+ new RenameAtomicity (path2 , new Path ("/hbase/test4" ),
2308
+ renameJson2 , getTestTracingContext (fs , true ),
2309
+ fileStatus .getEtag (), client ).preRename ();
2301
2310
2302
2311
fs .create (new Path (path , "file2.txt" ));
2303
2312
@@ -2334,7 +2343,7 @@ public void listCrashRecoveryWithMultipleJsonFile() throws Exception {
2334
2343
* @throws Exception if any error occurs during the test execution
2335
2344
*/
2336
2345
@ Test
2337
- public void getPathStatusWithPendingJsonFile () throws Exception {
2346
+ public void testGetPathStatusWithPendingJsonFile () throws Exception {
2338
2347
AzureBlobFileSystem fs = null ;
2339
2348
try {
2340
2349
Path path = new Path ("/hbase/A1/A2" );
@@ -2387,7 +2396,7 @@ public void getPathStatusWithPendingJsonFile() throws Exception {
2387
2396
* @throws Exception if any error occurs during the test execution
2388
2397
*/
2389
2398
@ Test
2390
- public void getPathStatusWithoutPendingJsonFile () throws Exception {
2399
+ public void testGetPathStatusWithoutPendingJsonFile () throws Exception {
2391
2400
try (AzureBlobFileSystem fs = Mockito .spy (this .getFileSystem ())) {
2392
2401
assumeBlobServiceType ();
2393
2402
@@ -2441,7 +2450,7 @@ public void getPathStatusWithoutPendingJsonFile() throws Exception {
2441
2450
* @throws Exception if any error occurs during the test execution
2442
2451
*/
2443
2452
@ Test
2444
- public void getPathStatusWithPendingJsonDir () throws Exception {
2453
+ public void testGetPathStatusWithPendingJsonDir () throws Exception {
2445
2454
try (AzureBlobFileSystem fs = Mockito .spy (this .getFileSystem ())) {
2446
2455
assumeBlobServiceType ();
2447
2456
@@ -2466,7 +2475,9 @@ public void getPathStatusWithPendingJsonDir() throws Exception {
2466
2475
conf .getClientCorrelationId (), fs .getFileSystemId (),
2467
2476
FSOperationType .GET_FILESTATUS , TracingHeaderFormat .ALL_ID_FORMAT , null );
2468
2477
2469
- AbfsHttpOperation abfsHttpOperation = client .getPathStatus (path .toUri ().getPath (), true , tracingContext , null ).getResult ();
2478
+ AbfsHttpOperation abfsHttpOperation
2479
+ = client .getPathStatus (path .toUri ().getPath (), true ,
2480
+ tracingContext , null ).getResult ();
2470
2481
2471
2482
Assertions .assertThat (abfsHttpOperation .getStatusCode ())
2472
2483
.describedAs ("Path should be found." )
@@ -2502,7 +2513,7 @@ public void getPathStatusWithPendingJsonDir() throws Exception {
2502
2513
* @throws Exception if any error occurs during the test execution
2503
2514
*/
2504
2515
@ Test
2505
- public void eTagChangedDuringRename () throws Exception {
2516
+ public void testETagChangedDuringRename () throws Exception {
2506
2517
AzureBlobFileSystem fs = null ;
2507
2518
try {
2508
2519
assumeBlobServiceType ();
0 commit comments