Merge pull request 'fix issues' (#4) from dev into master
All checks were successful
SonarQube / Build and analyze (push) Successful in 3m7s
Tests / Run Tests (push) Successful in 2m51s

Reviewed-on: #4
This commit was merged in pull request #4.
This commit is contained in:
2025-10-22 02:50:26 +00:00
3 changed files with 3 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ public class ChatSessionCompressionTests
.Setup(x => x.CompressHistoryAsync(It.IsAny<List<ChatMessage>>(), It.IsAny<int>(), It.IsAny<CancellationToken>())) .Setup(x => x.CompressHistoryAsync(It.IsAny<List<ChatMessage>>(), It.IsAny<int>(), It.IsAny<CancellationToken>()))
.Returns(async (List<ChatMessage> messages, int target, CancellationToken ct) => .Returns(async (List<ChatMessage> messages, int target, CancellationToken ct) =>
{ {
await Task.Delay(50); await Task.Delay(50, ct);
return delayedResult; return delayedResult;
}); });
compressionServiceMock compressionServiceMock

View File

@@ -359,7 +359,7 @@ public class ChatSessionTests
var session = new ChatSession(); var session = new ChatSession();
session.AddUserMessage("Test", "user"); session.AddUserMessage("Test", "user");
var lastUpdated = session.LastUpdatedAt; var lastUpdated = session.LastUpdatedAt;
await Task.Delay(10); // Small delay await Task.Delay(10, CancellationToken.None); // Small delay
// Act // Act
session.ClearHistory(); session.ClearHistory();

View File

@@ -232,7 +232,7 @@ public class InMemorySessionStorageTests
var originalTime = session.LastUpdatedAt; var originalTime = session.LastUpdatedAt;
// Wait a bit to ensure time difference // Wait a bit to ensure time difference
await Task.Delay(10); await Task.Delay(10, CancellationToken.None);
session.ChatTitle = "Updated Title"; session.ChatTitle = "Updated Title";