MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / TEST_P

Function TEST_P

src/IO/tests/gtest_writebuffer_s3.cpp:673–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671 });
672
673TEST_P(SyncAsync, ExceptionOnHead) {
674 setInjectionModel(std::make_shared<MockS3::HeadObjectFailIngection>());
675
676 getSettings()[Setting::s3_check_objects_after_upload] = true;
677
678 EXPECT_THROW({
679 try {
680 auto buffer = getWriteBuffer("exception_on_head_1");
681 buffer->write('A');
682 buffer->next();
683
684 getAsyncPolicy().setAutoExecute(true);
685 buffer->finalize();
686 }
687 catch( const DB::Exception& e )
688 {
689 ASSERT_EQ(ErrorCodes::S3_ERROR, e.code());
690 EXPECT_THAT(e.what(), testing::HasSubstr("Immediately after upload:"));
691 throw;
692 }
693 }, DB::S3Exception);
694}
695
696TEST_P(SyncAsync, ExceptionOnPut) {
697 setInjectionModel(std::make_shared<MockS3::PutObjectFailIngection>());

Callers

nothing calls this directly

Calls 8

writeMethod · 0.45
nextMethod · 0.45
setAutoExecuteMethod · 0.45
finalizeMethod · 0.45
codeMethod · 0.45
whatMethod · 0.45
preFinalizeMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected