Skip to content

fix(logs): adjust LogAssert log sorting to preserve expected order#59

Merged
mrproliu merged 7 commits into
apache:masterfrom
cqhasy:master
Sep 14, 2025
Merged

fix(logs): adjust LogAssert log sorting to preserve expected order#59
mrproliu merged 7 commits into
apache:masterfrom
cqhasy:master

Conversation

@cqhasy

@cqhasy cqhasy commented Sep 14, 2025

Copy link
Copy Markdown
Contributor

**aim:**Added sorting in LogAssert to ensure consistent order when logs appear concurrently.

**changes:**added deterministic sorting to logsEquals in LogAssert to ensure that logs are compared consistently, regardless of the order in which they appear.
Logs are now sorted by endpoint → body.type → body.content before performing assertions.
add two new logs in test file

@@ -1,3 +1,22 @@
/*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For latest mvnw, we don't need this Java class. For his older version, I am not sure whether it is proper to add ASF header.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do I need to delete this class or remove the ASF header?

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id></id>
<id>mock-collector-assembly</id>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why you need to change this?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please don’t change the default permission.

@mrproliu mrproliu merged commit c205048 into apache:master Sep 14, 2025
2 checks passed
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.

3 participants