Skip to content

Conversation

@pfi79
Copy link
Contributor

@pfi79 pfi79 commented Oct 7, 2024

There are unit tests in smartbft, where some logs are written via logger and some via testing.Logf.

As a result, when the test terminates with an error. Some of the sequential logs are in one place, some in another.

I decided to bring the logs to a single view through the logger. In order to deal with the floating error in the future

@pfi79 pfi79 requested a review from a team as a code owner October 7, 2024 18:07
dir := t.TempDir()
channelId := "testchannel"

flogging.ActivateSpec("debug")
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The default logs seem to be Info.
In case of failure I would like to see debug logs from the smartbft library

Copy link
Contributor

Choose a reason for hiding this comment

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

Why? the tests aren't flaky in CI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. The TestAddAndRemoveNodeWithoutStop test is not stable. Quite often it terminates with an error. I can't catch the error and fix it yet.

@yacovm yacovm enabled auto-merge (squash) October 7, 2024 18:24
@yacovm yacovm merged commit 132147e into hyperledger:main Oct 7, 2024
15 checks passed
@pfi79 pfi79 deleted the refactoring-unit-test branch October 7, 2024 18:31
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.

2 participants