Skip to content

Commit

Permalink
GH-39326: [C++] Flaky DatasetWriterTestFixture.MaxRowsOneWriteBackpre…
Browse files Browse the repository at this point in the history
…sure test (#39379)

### Rationale for this change

This patch reduce the number of open files in testing first. I've verify the test in 14.0.2, it hangs forever.

### What changes are included in this PR?

Change the test file number from 100 to 20

### Are these changes tested?

Already

### Are there any user-facing changes?

no

* Closes: #39326

Authored-by: mwish <maplewish117@gmail.com>
Signed-off-by: mwish <maplewish117@gmail.com>
  • Loading branch information
mapleFU authored Dec 29, 2023
1 parent bcaeaa8 commit 7c3480e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/src/arrow/dataset/dataset_writer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,12 @@ TEST_F(DatasetWriterTestFixture, MaxRowsOneWriteBackpresure) {
write_options_.max_open_files = 2;
write_options_.min_rows_per_group = kFileSizeLimit - 1;
auto dataset_writer = MakeDatasetWriter(/*max_rows=*/kFileSizeLimit);
for (int i = 0; i < 20; ++i) {
dataset_writer->WriteRecordBatch(MakeBatch(kFileSizeLimit * 5), "");
for (int i = 0; i < 5; ++i) {
dataset_writer->WriteRecordBatch(MakeBatch(kFileSizeLimit * 2), "");
}
EndWriterChecked(dataset_writer.get());
std::vector<ExpectedFile> expected_files;
for (int i = 0; i < 100; ++i) {
for (int i = 0; i < 10; ++i) {
expected_files.emplace_back("testdir/chunk-" + std::to_string(i) + ".arrow",
kFileSizeLimit * i, kFileSizeLimit);
}
Expand Down

0 comments on commit 7c3480e

Please sign in to comment.