Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rafttest: improve message formatting #162

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

pav-kv
Copy link
Contributor

@pav-kv pav-kv commented Feb 9, 2024

This PR makes rafttest traces in testdata more human-readable, especially in cases when messages contain more than one entry.

Print one entry per line, and indent entries appropriately. Print and indent snapshots in a separate line too.

@pav-kv pav-kv requested a review from ahrtr February 9, 2024 12:41
@pav-kv
Copy link
Contributor Author

pav-kv commented Feb 9, 2024

@ahrtr The essence of the change is in the util.go file. You can see the effect in testdata/*txt files - some tests became much more human-readable. E.g. see testdata/probe_and_replicate.txt.

Print one entry per line, and indent entries appropriately. Print and
indent snapshots in a separate line too.

Signed-off-by: Pavel Kalinnikov <[email protected]>
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

lgtm

Thanks

cc @erikgrinaker

Copy link
Contributor

@erikgrinaker erikgrinaker left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@ahrtr ahrtr merged commit 4d9f2f0 into etcd-io:main Feb 9, 2024
10 checks passed
@pav-kv pav-kv deleted the entry-list-formatting branch February 9, 2024 18:11
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