这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@culli
Copy link
Contributor

@culli culli commented Apr 18, 2025

fixes #797

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes issue #797 by ensuring that the OpenAPI representation of SSE events maintains a stable order.

  • Introduces new event types (AMessage and ZMessage) for ordering verification.
  • Refactors the SSE test suite to use a table-driven approach with subtests.
  • Applies sorting on the event schemas in the SSE registration to standardize the order.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
sse/sse_test.go Added new event types and refactored tests into a table-driven format to verify stable event ordering.
sse/sse.go Added a sorting step for event schemas using slices.SortFunc to ensure a stable order in the OpenAPI spec.
Comments suppressed due to low confidence (1)

sse/sse_test.go:60

  • [nitpick] Consider renaming 'sseTest' to a more descriptive name (e.g., 'sseSubTest') to clarify its purpose in organizing subtests.
type sseTest struct {

@codecov
Copy link

codecov bot commented Apr 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.11%. Comparing base (811c592) to head (44a4af0).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #806   +/-   ##
=======================================
  Coverage   93.10%   93.11%           
=======================================
  Files          23       23           
  Lines        5296     5299    +3     
=======================================
+ Hits         4931     4934    +3     
  Misses        313      313           
  Partials       52       52           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danielgtaylor danielgtaylor merged commit 6bfeeba into danielgtaylor:main Apr 22, 2025
5 checks passed
@danielgtaylor
Copy link
Owner

Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SSE definition introduces unstable order in openapi.yaml

2 participants