Skip to content

Commit

Permalink
Make test_multi_progress_bar test more resilient
Browse files Browse the repository at this point in the history
If the machine doing the testing is slow enough some non-negligible
time can elapse and the speed will be non zero.

'?' matches any character.

Example in our nightly builds: https://download.copr.fedorainfracloud.org/results/rpmsoftwaremanagement/dnf-nightly/fedora-41-aarch64/08278595-dnf5/builder-live.log.gz
  • Loading branch information
kontura authored and m-blaha committed Nov 21, 2024
1 parent bb6a9ee commit c54bf0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/libdnf5-cli/test_progressbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void ProgressbarTest::test_multi_progress_bar() {
"\\[1/2\\] test1 [ ]* 100% | 0.0 B\\/s | 10.0 B | ? \n"
"\\[2/2\\] test2 [ ]* 100% | 0.0 B\\/s | 10.0 B | ? \n"
"--------------------[-]*------------------------------------------------\n"
"\\[2/2\\] Total [ ]* 100% | 0.0 B\\/s | 20.0 B | 00m00s\n";
"\\[2/2\\] Total [ ]* 100% | ????? ??B\\/s | 20.0 B | ??m??s\n";

CPPUNIT_ASSERT_EQUAL_MESSAGE(
fmt::format("Expression: \"{}\" doesn't match output: \"{}\"", expected, oss.str()),
Expand Down

0 comments on commit c54bf0f

Please sign in to comment.