test_console_adapter: fix test failures caused by console gem update#5360
Merged
Conversation
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
Watson1978
added a commit
that referenced
this pull request
May 31, 2026
…nsole gem update (#5360) (#5366) **Which issue(s) this PR fixes**: Backport #5360 Fixes # **What this PR does / why we need it**: The `console` gem changed its duration log format from ` 0.0s` to ` 0.00s` in version 1.35.0 (socketry/console@14cf37d). This caused assertion failures in `ConsoleAdapterTest` when running on newer Ruby versions (3.3+). This patch will fix following error ``` $ bundle exec ruby -I"test:lib" test/log/test_console_adapter.rb Loaded suite test/log/test_console_adapter Started F ========================================================================================================================================== Failure: test_args[debug](ConsoleAdapterTest) test/log/test_console_adapter.rb:59:in 'ConsoleAdapterTest#test_args' 56: fatal: :fatal) 57: def test_args(level) 58: @console_logger.send(level, "subject", 1, 2, 3) => 59: assert_equal([ 60: "#{@timestamp_str} [#{level}]: 0.0s: subject\n" + 61: " | 1\n" + 62: " | 2\n" + <["2023-01-01 15:32:41 +0000 [debug]: 0.0s: subject\n" + " | 1\n" + " | 2\n" + " | 3\n"]> expected but was <["2023-01-01 15:32:41 +0000 [debug]: 0.00s: subject\n" + " | 1\n" + " | 2\n" + " | 3\n"]> diff: ? ["2023-01-01 15:32:41 +0000 [debug]: 0.00s: subject\n" + " | 1\n" + " | 2\n" + " | 3\n"] ========================================================================================================================================== F ... ``` **Docs Changes**: **Release Note**: Signed-off-by: Shizuo Fujita <fujita@clear-code.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Shizuo Fujita <fujita@clear-code.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue(s) this PR fixes:
Fixes #
What this PR does / why we need it:
The
consolegem changed its duration log format from0.0sto0.00sin version 1.35.0 (socketry/console@14cf37d).This caused assertion failures in
ConsoleAdapterTestwhen running on newer Ruby versions (3.3+).This patch will fix following error
Docs Changes:
Release Note: