Skip to content

Conversation

@segogoreng
Copy link

@segogoreng segogoreng commented Sep 23, 2025

Summary

Continues work from #1723 by @FGasper .
This PR rebases with the latest master.

This fixes issue #1722.

Changes

Prevent stats.end() if stats.start() never ran.

Motivation

Allow skipping a test in a setup/before hook. See issue #1722 for an example.

Related issues

Closes #1722

Copy link
Author

Choose a reason for hiding this comment

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

Do we need a new test file for this?
I feel like we can put this in the existing test file.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think so too. You might also find there's an existing substitute for mySuite.

Copy link
Author

Choose a reason for hiding this comment

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

Moved the test to suite/suite_test.go and renamed mySuite to a more descriptive suiteSkipTestWithStats

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.

suite: skip in SetupTest() with HandleStats() causes panic

3 participants