fix(test): read back history after SetHistory to account for CreatedAt normalization

This commit is contained in:
LiusCraft
2026-05-11 01:09:22 +08:00
parent 3e30e8abc6
commit 34e73f6b1a
+4
View File
@@ -1062,6 +1062,8 @@ func TestProcessMessage_BtwCommandRunsWithoutPersistingHistory(t *testing.T) {
defaultAgent.Sessions.SetHistory(sessionKey, initialHistory)
defaultAgent.Sessions.SetSummary(sessionKey, "The team decided to keep state request-scoped.")
initialHistory = defaultAgent.Sessions.GetHistory(sessionKey)
response, err := al.processMessage(context.Background(), msg)
if err != nil {
t.Fatalf("processMessage() error = %v", err)
@@ -1180,6 +1182,8 @@ func TestProcessMessage_BtwCommandUsesIsolatedProvider(t *testing.T) {
}
defaultAgent.Sessions.SetHistory(mainSessionKey, initialHistory)
initialHistory = defaultAgent.Sessions.GetHistory(mainSessionKey)
// Process a /btw command
response, err := al.processMessage(context.Background(), bus.InboundMessage{
Channel: "telegram",