MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / resetDBFlaky

Method resetDBFlaky

test/copy/copy_test.cpp:100–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 createDBAndConn();
99 }
100 void resetDBFlaky(bool canFailDuringExecute = true, bool canFailDuringCheckpoint = true,
101 bool canFailDuringCommit = true) {
102 database.reset();
103 conn.reset();
104 systemConfig->bufferPoolSize = main::SystemConfig{}.bufferPoolSize;
105 auto constructBMFunc = [&](const main::Database& db) {
106 auto bm = std::unique_ptr<FlakyBufferManager>(new FlakyBufferManager(databasePath,
107 databasePath + ".copy.tmp", systemConfig->bufferPoolSize, systemConfig->maxDBSize,
108 getFileSystem(db), systemConfig->readOnly, failureFrequency, canFailDuringExecute,
109 canFailDuringCheckpoint, canFailDuringCommit));
110 currentBM = bm.get();
111 return bm;
112 };
113 database = BaseGraphTest::constructDB(databasePath, *systemConfig, constructBMFunc);
114 conn = std::make_unique<main::Connection>(database.get());
115 currentBM->setClientContext(conn->getClientContext());
116 }
117 std::string getInputDir() override { UNREACHABLE_CODE; }
118 void BMExceptionRecoveryTest(BMExceptionRecoveryTestConfig cfg);
119 std::string writeCSV(const std::string& fileName, const std::vector<std::string>& rows) {

Callers

nothing calls this directly

Calls 4

setClientContextMethod · 0.80
resetMethod · 0.45
getMethod · 0.45
getClientContextMethod · 0.45

Tested by

no test coverage detected