Skip to content

Commit 700ad68

Browse files
bmehta001Copilot
andcommitted
Fix DebugEventListener test: remove cache size limit for phase 2
Phase 1 fills the 1MB database with 100K events that may not fully upload during teardown. Phase 2 reuses the same DB, so the cache file size limit must be removed to allow new events to be stored. This is simpler and more robust than using a separate DB path or trying to delete the file between phases (which races with sqlite3_close_v2). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 97ae383 commit 700ad68

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/functests/APITest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,10 @@ TEST(APITest, LogManager_Initialize_DebugEventListener)
408408
debugListener.numSent = 0;
409409
debugListener.numLogged = 0;
410410

411+
// Remove the cache file size limit so phase 2 can write to the existing
412+
// DB even though phase 1 filled it with 100K events.
413+
configuration[CFG_INT_CACHE_FILE_SIZE] = 0;
414+
411415
ILogger *result = LogManager::Initialize(TEST_TOKEN, configuration);
412416

413417
// Log some foo

0 commit comments

Comments
 (0)