Skip to content

Commit 944800f

Browse files
author
ehennum
committed
fail on leaking row id (internal bug 55296)
1 parent f7e7246 commit 944800f

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

marklogic-client-api/src/test/java/com/marklogic/client/test/datamovement/RowBatcherTest.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,9 @@ private void runXmlRowsTest(RowBatcher<Document> rowBatcher) throws Exception {
440440
return;
441441
}
442442
break;
443-
// TODO: remove rowid
444443
case "rowid":
444+
System.out.println("has rowid column");
445+
failed.set(true);
445446
break;
446447
default:
447448
System.out.println("unknown cell "+cellName+" in row "+i+" of batch="+event.getJobBatchNumber()+
@@ -501,9 +502,10 @@ private void runCsvRowsTest(RowBatcher<String> rowBatcher) throws Exception {
501502
((event.getJobBatchNumber() == 1) ? "\n"+event.getRowsDoc() : "")); */
502503
try {
503504
BufferedReader reader = new BufferedReader(new StringReader(event.getRowsDoc()));
504-
String[] columns = commaSplitter.split(reader.readLine());
505-
// TODO: CHANGE TO 5 AFTER REMOVING rowid COLUMN
506-
if (columns.length != 6) {
505+
String firstLine = reader.readLine();
506+
// System.out.println(firstLine);
507+
String[] columns = commaSplitter.split(firstLine);
508+
if (columns.length != 5) {
507509
System.out.println("unexpected number of columns "+columns.length+
508510
" for batch="+event.getJobBatchNumber()+
509511
" from "+event.getLowerBound()+" through "+event.getUpperBound());
@@ -519,8 +521,10 @@ private void runCsvRowsTest(RowBatcher<String> rowBatcher) throws Exception {
519521
case "field2":
520522
case "field3":
521523
case "field4":
522-
// TODO: remove rowid
524+
break;
523525
case "rowid":
526+
System.out.println("has rowid column");
527+
failed.set(true);
524528
break;
525529
default:
526530
System.out.println("unknown column "+colName+" of batch="+event.getJobBatchNumber()+

0 commit comments

Comments
 (0)