Skip to content

[release] 1.0.1rc1: more logs and defensive mechanism for test collection#49

Merged
zhming0 merged 1 commit intomainfrom
ming/te-3588
Apr 3, 2025
Merged

[release] 1.0.1rc1: more logs and defensive mechanism for test collection#49
zhming0 merged 1 commit intomainfrom
ming/te-3588

Conversation

@zhming0
Copy link
Contributor

@zhming0 zhming0 commented Apr 3, 2025

We had one report of Test Result upload contains empty data. User claimed that this only started happening since v1.0.0.

I couldn't not reproduce the same issue (using the same pytest version) so I had to make a logical guess:

  • The fact that upload works means our plugin is successfully loaded.
  • The fact that v0.2.0 works means there is no problem in our pytest_runtest_logreport hook (v1 introduced pytest_runtest_teardown hook to collect test, v0.2 relies solely on pytest_runtest_logreport).
  • So my guess is that something prevent pytest_runtest_teardown from running.

So I added lots of debug logging, user can opt-in to seeing them by setting env var DEBUG=1.

I also add some a defensive mechanism: another pytest_runtest_logfinish hook hoping as a fallback option.

@zhming0 zhming0 requested a review from a team April 3, 2025 04:44
@zhming0 zhming0 changed the title TE-3588: more logs and defensive mechanism for test collection [release] 1.0.1rc1: more logs and defensive mechanism for test collection Apr 3, 2025
@zhming0 zhming0 merged commit 6fba081 into main Apr 3, 2025
11 checks passed
@zhming0 zhming0 deleted the ming/te-3588 branch April 3, 2025 05:08
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.

2 participants