Skip to content

Commit 3578b14

Browse files
authored
Fix test (#697)
* pops 2 messages at a time when truncating history * fix: test
1 parent e0d4b97 commit 3578b14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/q_cli/src/cli/chat/conversation_state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,8 @@ mod tests {
569569
let s = conversation_state.as_sendable_conversation_state();
570570
assert_eq!(
571571
s.history.as_ref().unwrap().len(),
572-
MAX_CONVERSATION_STATE_HISTORY_LEN,
573-
"history should be capped at {}",
572+
MAX_CONVERSATION_STATE_HISTORY_LEN - 1,
573+
"history should be capped at {}, and we would only see 24 after truncating because we would be removing 2 at a time",
574574
MAX_CONVERSATION_STATE_HISTORY_LEN
575575
);
576576
let last_msg = s.history.as_ref().unwrap().iter().last().unwrap();

0 commit comments

Comments
 (0)