Skip to content

Commit 1b0f514

Browse files
Fix resource leak on Test codes by copilot
https: //github.com/microsoft/pull/1825#discussion_r3303117760 Co-Authored-By: Copilot <198982749+Copilot@users.noreply.github.com>
1 parent 6f8fa89 commit 1b0f514

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/standalone/Garnet.test/ShutdownDataConsistencyTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public async Task CheckpointThenAofCommit_DataConsistencyTest()
138138
PopulateData();
139139

140140
// Create CancellationTokenSource with a long timeout to prevent hanging indefinitely in case of issues during shutdown
141-
var cts = new CancellationTokenSource(TimeSpan.FromMinutes(5));
141+
using var cts = new CancellationTokenSource(TimeSpan.FromMinutes(5));
142142
TestContext.Progress.WriteLine($"Created CancellationTokenSource with 5 minute timeout for test shutdown");
143143

144144
// Sequence: Checkpoint first, then AOF commit

0 commit comments

Comments
 (0)