Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
majetideepak committed Oct 24, 2024
1 parent aae682d commit 8b48d79
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ std::shared_ptr<GcsTestbench> GCSInsertTest::testbench_ = nullptr;

TEST_F(GCSInsertTest, gcsInsertTest) {
const int64_t kExpectedRows = 1'000;
const std::string_view newFile = "insertFile.txt";
const auto gcsFile = gcsURI(testbench_->preexistingBucketName(), newFile);

auto rowType = ROW(
{"c0", "c1", "c2", "c3"}, {BIGINT(), INTEGER(), SMALLINT(), DOUBLE()});
Expand All @@ -102,7 +100,9 @@ TEST_F(GCSInsertTest, gcsInsertTest) {
// Insert into GCS with one writer.
auto plan = PlanBuilder()
.values({input})
.tableWrite(gcsFile.data(), dwio::common::FileFormat::PARQUET)
.tableWrite(
testbench_->preexistingBucketName().data(),
dwio::common::FileFormat::PARQUET)
.planNode();

// Execute the write plan.
Expand Down Expand Up @@ -132,7 +132,8 @@ TEST_F(GCSInsertTest, gcsInsertTest) {
// Read from 'writeFileName' and verify the data matches the original.
plan = PlanBuilder().tableScan(rowType).planNode();

auto filePath = fmt::format("{}{}", gcsFile, writeFileName);
auto filePath =
fmt::format("{}/{}", testbench_->preexistingBucketName(), writeFileName);
const int64_t fileSize = fileWriteInfos[0]["fileSize"].asInt();
auto split = HiveConnectorSplitBuilder(filePath)
.fileFormat(dwio::common::FileFormat::PARQUET)
Expand Down

0 comments on commit 8b48d79

Please sign in to comment.