Repository navigation
Start the view tests early in a second - #327
Merged
Merged
Conversation
A view's duration is the difference of two whole-second timestamps, so a
view stopped right after it started reports 1 s whenever the two calls
fall on either side of a second boundary, and the strict 0.0 duration
checks failed on busy runners ("0.0 expected duration, got 1.0"). The
view test classes now wait in their setup until the clock is within the
first 200 ms of a second.
Dependency security scanScanned 25 resolved dependencies, failing on HIGH and above. Result: passed |
arifBurakDemiray
marked this pull request as ready for review
October 23, 2026 08:51
Code coverage
No changed file appears in a coverage report. Either none of the changed Java files are in a measured module, or they are test sources. Least covered classes (10 shown)
|
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.
What
The view tests are the most frequent CI failure: 15 of the last 40 failed runs, on master, staging and PR branches alike, all with
0.0 expected duration, got 1.0.sc_MV_ManualViewTests.MV_201A_autoStopped_pausedResumed_Legacysc_MV_ManualViewTests.MV_200A_autostartView_autoClose_legacyModuleViewsTests.validateSegmentation1,validateSegmentation2ModuleViewsTests.validateSegmentation_internalKeys,useWithAutoStoppedOnes,simpleFlow,mixedTestFlow1Why
ModuleViewsmeasures a view asTimeUtils.uniqueTimestampS()(milliseconds / 1000) at the stop minus the same at the start, in whole seconds, as the reference SDK does. A view stopped a few milliseconds after it started therefore reports 1 s when the two calls fall on either side of a second boundary.TestUtils.validateEventkeeps a 0.0 expectation strict on purpose, so the test fails.Change
TestUtils.awaitStartOfSecond()waits for the next second when the clock is past the first 200 ms of the current one. The setup of both view test classes calls it, and so doesSessionImplTests.view_stopStartedAndNext, which expects 0.0 from a view stopped by the next one. The SDK and the assertions are unchanged; the reference SDK fixed the same flake the same way (alignToSecondBoundaryin its test utilities).Verified
SessionImplTests: 93 of 93.🤖 Generated with Claude Code