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

Function TEST_F

src/IO/tests/gtest_writebuffer_s3.cpp:930–953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

928
929
930TEST_F(WBS3Test, PrefinalizeCalledMultipleTimes) {
931#ifdef DEBUG_OR_SANITIZER_BUILD
932 GTEST_SKIP() << "this test trigger LOGICAL_ERROR, runs only if DEBUG_OR_SANITIZER_BUILD is not defined";
933#else
934 EXPECT_THROW({
935 try {
936 auto buffer = getWriteBuffer("prefinalize_called_multiple_times");
937 buffer->write('A');
938 buffer->next();
939 buffer->preFinalize();
940 buffer->write('A');
941 buffer->next();
942 buffer->preFinalize();
943 buffer->finalize();
944 }
945 catch(const DB::Exception & e)
946 {
947 ASSERT_EQ(ErrorCodes::LOGICAL_ERROR, e.code());
948 EXPECT_THAT(e.what(), testing::HasSubstr("write to prefinalized buffer for S3"));
949 throw;
950 }
951 }, DB::Exception);
952#endif
953}
954
955TEST_P(SyncAsync, EmptyFile) {
956 getSettings()[Setting::s3_check_objects_after_upload] = true;

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected