Skip to content

fix(test-consume): end each hive test only once - #3879

Merged
spencer-tb merged 1 commit into
ethereum:forks/bogotafrom
danceratopz:hive-end-test-once
Oct 21, 2026
Merged

spencer-tb merged 1 commit into
ethereum:forks/bogotafrom
danceratopz:hive-end-test-once

Conversation

@danceratopz

Copy link
Copy Markdown
Member

Description

Call test.end exactly once in the hive_test fixture teardown.

Before this change, test.end was called inside the try block that builds the result details, and again in the except branch. If test.end itself raised, for example because the response was lost after hive had already recorded the result, the except branch sent a second end request for the same test. The result is now built inside the try block and test.end is called once after it. If that call raises, pytest reports a teardown error and hive closes the open test case as "Test was terminated by host", so the failure stays visible.

Related Issues or PRs

Replaces #3335. The root cause of the lost results (one new TCP connection per hive API call) is fixed in hive-python-api#18, released in ethereum-hive v0.1.0, which this repo already requires.

Checklist

  • Ran fast static checks to avoid CI fails, see Code Standards & Verifying Changes: just static
  • PR title has the form <type>(<area>): <description>, where <type> and <area> come from an appropriate C-<type>, respectively A-<area>, label. The title should match the target squash commit message.

Cute Animal Picture

One cat

Move the test.end call out of the try block in the hive_test fixture teardown. Previously, if end raised (for example a lost response after the server had already recorded the result), the except branch called end a second time, which could send a duplicate request to hive.
@danceratopz danceratopz added A-test-consume Area: execution_testing.cli.pytest_commands.plugins.consume C-bug Category: this is a bug, deviation, or other problem labels Oct 21, 2026
@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.09%. Comparing base (b901492) to head (9b6359d).

Additional details and impacted files
@@              Coverage Diff              @@
##           forks/bogota    #3879   +/-   ##
=============================================
  Coverage         95.09%   95.09%           
=============================================
  Files               673      673           
  Lines             40904    40904           
  Branches           3778     3778           
=============================================
  Hits              38896    38896           
  Misses             1397     1397           
  Partials            611      611           
Flag Coverage Δ
unittests 95.08% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@spencer-tb
spencer-tb merged commit 921c079 into ethereum:forks/bogota Oct 21, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-consume Area: execution_testing.cli.pytest_commands.plugins.consume C-bug Category: this is a bug, deviation, or other problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants