Skip to content

Commit 0eabc1f

Browse files
authored
fix non deterministic in testFileMetadataValidation and testBulkFileCheck (#5947)
1 parent c4747e6 commit 0eabc1f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

server/base/src/test/java/org/apache/accumulo/server/constraints/MetadataConstraintsTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,9 @@ BulkFileColumnFamily.NAME, new Text(StoredTabletFile
360360
m = new Mutation(new Text("0;foo"));
361361
m.put(BulkFileColumnFamily.NAME,
362362
new Text(StoredTabletFile.of(new Path("hdfs://1.2.3.4/accumulo/tables/2a/t-0003/someFile"))
363-
.getMetadata().replaceFirst("\"path\":\".*\",\"startRow", "\"path\":\"\",\"startRow")),
363+
.getMetadata().replaceFirst("\"path\":\".*\"", "\"path\":\"\"")),
364364
new Value(fateId1.canonical()));
365+
365366
assertViolation(mc, m, (short) 3100);
366367

367368
// Bad Json - test startRow key replaced with empty string so validation should fail
@@ -435,8 +436,9 @@ columnFamily, new Text(StoredTabletFile
435436
m = new Mutation(new Text("0;foo"));
436437
m.put(columnFamily,
437438
new Text(StoredTabletFile.of(new Path("hdfs://1.2.3.4/accumulo/tables/2a/t-0003/someFile"))
438-
.getMetadata().replaceFirst("\"path\":\".*\",\"startRow", "\"path\":\"\",\"startRow")),
439+
.getMetadata().replaceFirst("\"path\":\".*\"", "\"path\":\"\"")),
439440
value);
441+
440442
assertViolation(mc, m, (short) 3100);
441443

442444
// Bad Json - test startRow key replaced with empty string so validation should fail

0 commit comments

Comments
 (0)