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

Down migrations can pollute `cargo --test` output #984

Closed
agersant opened this Issue Jul 1, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@agersant

agersant commented Jul 1, 2017

Using Rust 1.18, Diesel 0.13.0 on Windows.

When running cargo test, the testing output gets polluted by diesel output for down migrations (if any occur during the tests). Sample output from https://github.com/agersant/polaris unit tests:

test config::test_clean_path_string ... ok
Rolling back migration 201706272327
test db::test_migrations_up ... ok
Rolling back migration 201706272313
Rolling back migration 201706272304
Rolling back migration 201706272129
test index::test_browse_top_level ... ok
test index::test_browse ... ok
Rolling back migration 201706250228
Rolling back migration 201706250006
test db::test_migrations_down ... ok

Migrations are executed via calls to diesel::migrations::revert_latest_migration_in_directory in some of my tests.

I thought cargo suppressed std out during successful tests so I'm unsure if this is a cargo bug or a diesel bug.

@sgrif

This comment has been minimized.

Member

sgrif commented Jul 4, 2017

This sounds like a bug in cargo or rustc. That function prints to stdout as you mentioned, which should be getting captured.

@sgrif sgrif closed this Jul 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment