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

chore(conductor): clean up chain id tests #1765

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ethanoroshiba
Copy link
Contributor

@ethanoroshiba ethanoroshiba commented Oct 29, 2024

Summary

Shortened conductor chain ID tests.

Background

The chain ID tests necessitate awaiting the conductor's shutdown and checking its result, which is made difficult by the fact that TestConductor implements the Drop trait. This cleans up the tests by making use of ManuallyDrop, at the expense of using the unsafe ptr::read function to await the conductor handle. Because drop is never called, though, this reference is not read again.

Changes

  • Used ManuallyDrop<TestConductor> to avoid having to manually set up the conductor for chain ID tests.
  • Reverted to using macros for mounts.

Testing

Tests working correctly.

Changelogs

No updates required.

Related Issues

closes #1602

@github-actions github-actions bot added the conductor pertaining to the astria-conductor crate label Oct 29, 2024
@ethanoroshiba ethanoroshiba marked this pull request as ready for review October 29, 2024 16:09
@ethanoroshiba ethanoroshiba requested a review from a team as a code owner October 29, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conductor pertaining to the astria-conductor crate testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: clean up conductor chain ID tests
1 participant