|
21 | 21 | import static org.apache.hadoop.ozone.OzoneConsts.ETAG;
|
22 | 22 | import static org.apache.hadoop.ozone.OzoneConsts.MD5_HASH;
|
23 | 23 | import static org.apache.hadoop.ozone.OzoneConsts.OZONE_URI_SCHEME;
|
24 |
| -import static org.apache.hadoop.ozone.TestDataUtil.createKey; |
25 | 24 | import static org.apache.hadoop.ozone.om.exceptions.OMException.ResultCodes.NOT_A_FILE;
|
26 | 25 | import static org.assertj.core.api.Assertions.assertThat;
|
27 | 26 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
@@ -352,13 +351,9 @@ public void testListKeysWithNotNormalizedPath() throws Exception {
|
352 | 351 | keys.add(OmUtils.normalizeKey(key2, false));
|
353 | 352 | keys.add(OmUtils.normalizeKey(key3, false));
|
354 | 353 |
|
355 |
| - int length = 10; |
356 |
| - byte[] input = new byte[length]; |
357 |
| - Arrays.fill(input, (byte)96); |
358 |
| - |
359 |
| - createAndAssertKey(ozoneBucket, key1, 10, input); |
360 |
| - createAndAssertKey(ozoneBucket, key2, 10, input); |
361 |
| - createAndAssertKey(ozoneBucket, key3, 10, input); |
| 354 | + createAndAssertKey(ozoneBucket, key1, 10); |
| 355 | + createAndAssertKey(ozoneBucket, key2, 10); |
| 356 | + createAndAssertKey(ozoneBucket, key3, 10); |
362 | 357 |
|
363 | 358 | // Iterator with key name as prefix.
|
364 | 359 |
|
@@ -403,10 +398,10 @@ private void checkKeyList(Iterator<? extends OzoneKey > ozoneKeyIterator,
|
403 | 398 | assertEquals(keys, outputKeys);
|
404 | 399 | }
|
405 | 400 |
|
406 |
| - private void createAndAssertKey(OzoneBucket ozoneBucket, String key, int length, byte[] input) |
| 401 | + private void createAndAssertKey(OzoneBucket ozoneBucket, String key, int length) |
407 | 402 | throws Exception {
|
408 | 403 |
|
409 |
| - createKey(ozoneBucket, key, input); |
| 404 | + byte[] input = TestDataUtil.createStringKey(ozoneBucket, key, length); |
410 | 405 | // Read the key with given key name.
|
411 | 406 | readKey(ozoneBucket, key, length, input);
|
412 | 407 |
|
|
0 commit comments