Skip to content

cargo test doesn't capture print from threads #4129

@kpcyrd

Description

@kpcyrd

I ran the tests for one of my crates that uses threads in its example code. I've noticed it printed some lines to stdout, even though --nocapture wasn't set, but not all of them. It appears that text printed from new threads are not correctly captured, I think this is not intended.

running 2 tests
request: 123
test tests::readme ... ok
test tests::single_requester ... ok

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions