Skip to content

Commit 67ab378

Browse files
anakin87Amnah199
andauthored
test: OpenAIChatGenerator - fix flaky test (#9075)
Co-authored-by: Amna Mubashar <amnahkhan.ak@gmail.com>
1 parent f3fc689 commit 67ab378

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/components/generators/chat/test_openai.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ def __call__(self, chunk: StreamingChunk) -> None:
886886

887887
# check that the completion_start_time is set and valid ISO format
888888
assert "completion_start_time" in message.meta
889-
assert datetime.fromisoformat(message.meta["completion_start_time"]) < datetime.now()
889+
assert datetime.fromisoformat(message.meta["completion_start_time"]) <= datetime.now()
890890

891891
assert isinstance(message.meta["usage"], dict)
892892
assert message.meta["usage"]["prompt_tokens"] > 0

0 commit comments

Comments
 (0)