MCPcopy Create free account
hub / github.com/bytedance/bolt / TEST_F

Function TEST_F

bolt/exec/tests/DriverTest.cpp:470–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468 expectWithDelay([&]() { return test; }, __FILE__, __LINE__, #test)
469
470#ifndef SPARK_COMPATIBLE
471TEST_F(DriverTest, error) {
472 CursorParameters params;
473 params.planNode =
474 makeValuesFilterProject(rowType_, "m1 % 0 > 0", "", 100, 10);
475 params.maxDrivers = 20;
476 int32_t numRead = 0;
477 try {
478 readResults(params, ResultOperation::kRead, 1'000'000, &numRead);
479 EXPECT_TRUE(false) << "Expected exception";
480 } catch (const BoltException& e) {
481 EXPECT_NE(e.message().find("Cannot divide by 0"), std::string::npos);
482 }
483 EXPECT_EQ(numRead, 0);
484 EXPECT_TRUE(stateFutures_.at(0).isReady());
485 // Realized immediately since task not running.
486 EXPECT_TRUE(tasks_[0]
487 ->taskCompletionFuture()
488 .within(std::chrono::microseconds(1'000'000))
489 .isReady());
490 EXPECT_EQ(tasks_[0]->state(), TaskState::kFailed);
491}
492#endif
493

Callers

nothing calls this directly

Calls 15

PlanBuilderClass · 0.85
assertQueryFunction · 0.85
messageMethod · 0.80
taskCompletionFutureMethod · 0.80
waitMethod · 0.80
numRunningDriversMethod · 0.80
taskStatsMethod · 0.80
backMethod · 0.80
taskMethod · 0.80
projectMethod · 0.80
createFunction · 0.50
QueryConfigClass · 0.50

Tested by

no test coverage detected