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

Unskip test: test_read_incomplete_no_warning #1153

Closed
Tracked by #496
alexowens90 opened this issue Dec 11, 2023 · 2 comments
Closed
Tracked by #496

Unskip test: test_read_incomplete_no_warning #1153

alexowens90 opened this issue Dec 11, 2023 · 2 comments
Labels
bug Something isn't working flaky test Tracking tests that fail inconsistently in CI

Comments

@alexowens90
Copy link
Collaborator

alexowens90 commented Dec 11, 2023

Seen on Windows 3.10

_____________ test_read_incomplete_no_warning[EncodingVersion.V1] _____________

s3_version_store = NativeVersionStore: Library: test_read_incomplete_no_warnin.838_2023-12-11T15_35_11_012005, Primary Storage: s3_storage.
capfd = <_pytest.capture.CaptureFixture object at 0x000001C3A34323B0>

    def test_read_incomplete_no_warning(s3_version_store, capfd):
        lib = s3_version_store
        symbol = "test_read_incomplete_no_warning"
        lib._lib_cfg.lib_desc.version.write_options.incomplete = True
    
        write_df = pd.DataFrame({"a": [1, 2, 3]}, index=pd.DatetimeIndex([1, 2, 3]))
        lib.append(symbol, write_df, incomplete=True)
        # Need to compact so that the APPEND_REF points to a non-existent APPEND_DATA (intentionally)
        lib.compact_incomplete(symbol, True, False, False, True)
        set_log_level("DEBUG")
    
        read_df = lib.read(symbol, date_range=(pd.to_datetime(0), pd.to_datetime(10))).data
        assert_frame_equal(read_df, write_df.tz_localize("UTC"))
    
        out, err = capfd.readouterr()
        expected_log_messages = {
            "D arcticdb.storage | Failed to find segment for key": 1,
            "W arcticdb.storage | Failed to find segment for key": 0,
        }
        for msg, count in expected_log_messages.items():
>           assert out.count(msg) == count or err.count(msg) == count
E           AssertionError: assert (0 == 1 or 0 == 1)
E            +  where 0 = <built-in method count of str object at 0x000001C38B508030>('D arcticdb.storage | Failed to find segment for key')
E            +    where <built-in method count of str object at 0x000001C38B508030> = ''.count
E            +  and   0 = <built-in method count of str object at 0x000001C38B508030>('D arcticdb.storage | Failed to find segment for key')
E            +    where <built-in method count of str object at 0x000001C38B508030> = ''.count
@alexowens90 alexowens90 mentioned this issue Dec 11, 2023
19 tasks
@poodlewars poodlewars changed the title Flaky test: test_read_incomplete_no_warning Unskip test: test_read_incomplete_no_warning Dec 15, 2023
@poodlewars
Copy link
Collaborator

This has been skipped for now is no longer flaky, updated the title

@poodlewars poodlewars added the bug Something isn't working label Dec 19, 2023
@alexowens90 alexowens90 added the flaky test Tracking tests that fail inconsistently in CI label Dec 27, 2023
@poodlewars
Copy link
Collaborator

Let's just remove the tests that assert log messages (while being careful not to lose coverage of code paths)

@poodlewars poodlewars closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flaky test Tracking tests that fail inconsistently in CI
Projects
None yet
Development

No branches or pull requests

3 participants