Repository navigation
fix(test-consume): end each hive test only once - #3879
Merged
Merged
Conversation
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.
2 tasks done
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
spencer-tb
approved these changes
Oct 21, 2026
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.
Description
Call
test.endexactly once in thehive_testfixture teardown.Before this change,
test.endwas called inside thetryblock that builds the result details, and again in theexceptbranch. Iftest.enditself raised, for example because the response was lost after hive had already recorded the result, theexceptbranch sent a second end request for the same test. The result is now built inside thetryblock andtest.endis 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-hivev0.1.0, which this repo already requires.Checklist
just static<type>(<area>): <description>, where<type>and<area>come from an appropriateC-<type>, respectivelyA-<area>, label. The title should match the target squash commit message.Cute Animal Picture