Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky test in TLVBlockFileReader #2140

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

xgouchet
Copy link
Member

What does this PR do?

We had some flakiness in the TLV tests

@xgouchet xgouchet requested review from a team as code owners July 24, 2024 11:31
@@ -88,6 +89,7 @@ internal class TLVBlockFileReaderTest {
@Test
fun `M log error W read() { invalid TLV type }`() {
// Given
assumeTrue(fakeDataString.length > 2)
Copy link
Member

Choose a reason for hiding this comment

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

Minor: this assumption can fix flaky test, but it seems this case worth being covered as well. we can have a if else condition to test if the length is smaller or equal than 2, internalLogger should output error which starts with "Failed to deserialize TLV data length".

@codecov-commenter
Copy link

codecov-commenter commented Jul 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.88%. Comparing base (54f5f12) to head (89d5a79).
Report is 10 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2140      +/-   ##
===========================================
- Coverage    70.00%   69.88%   -0.12%     
===========================================
  Files          726      726              
  Lines        26970    26980      +10     
  Branches      4521     4522       +1     
===========================================
- Hits         18879    18853      -26     
- Misses        6817     6857      +40     
+ Partials      1274     1270       -4     

see 36 files with indirect coverage changes

@xgouchet xgouchet force-pushed the xgouchet/flaky_tests_tlv branch from f3a980e to 89d5a79 Compare July 24, 2024 12:18
@xgouchet xgouchet merged commit 1d52055 into develop Jul 24, 2024
19 checks passed
@xgouchet xgouchet deleted the xgouchet/flaky_tests_tlv branch July 24, 2024 12:46
@xgouchet xgouchet added this to the 2.12.x milestone Jul 31, 2024
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.

5 participants