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

ignore tests with deps #628

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mxfactorial
Copy link

current

https://doc.arroyo.dev/developing/dev-setup#testing tasks the cargo test and cargo nextest run commands after a master clone but several tests with dependencies fail

expected

  1. post master clone cargo test commands pass
  2. cargo test -- --ignored to run tests with dependencies

welcome to change expected

@mwylde
Copy link
Member

mwylde commented Jun 11, 2024

Hey @mxfactorial — thanks for your contribution! I feel for the problem you're trying to solve here—it's annoying for tests to fail because of services that aren't running. However, I don't think using ignore is the best approach, since these are valuable tests that in general we do want to run. Instead, it might be possible to use cargo features to disable tests, since in CI we already run with --all-features.

@mxfactorial
Copy link
Author

can add kafka = [] to Cargo.toml features, then #[cfg_attr(not(feature = "kafka"), ignore)] etc

but more errors appear since opening the pr

for example, cargo test fails when crates/arroyo-controller/build.rs doesnt connect to postgres

the devx intended by this branch is a pass after git clone && cargo test

which devs rely on for an initial sanity test when onboarding

but this project doesnt currently restrict cargo test to unit tests

add requirements at your leisure

can help test on a fresh machine if lowering the onboarding cost is a priority for you

other options:

  1. increasing content in https://doc.arroyo.dev/developing/dev-setup#testing
  2. add a cloud dev env (gitpod/codespace)

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