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

cli: privileged_port test is ignored #11

Open
ackintosh opened this issue Jan 22, 2020 · 0 comments · May be fixed by #12
Open

cli: privileged_port test is ignored #11

ackintosh opened this issue Jan 22, 2020 · 0 comments · May be fixed by #12

Comments

@ackintosh
Copy link
Contributor

Currently the privileged_port test is ignored.

running 4 tests
test tests::privileged_port ... ignored
test tests::invalid_argument ... ok
test tests::invalid_ip_address ... ok
test tests::invalid_whisper_pool_size ... ok

test result: ok. 3 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out

I tried removing #[ignore] from the test, got the error:

running 4 tests
test tests::invalid_argument ... ok
test tests::privileged_port ... FAILED
test tests::invalid_ip_address ... ok
test tests::invalid_whisper_pool_size ... ok

failures:

---- tests::privileged_port stdout ----
thread 'tests::privileged_port' panicked at 'Builder::init should not be called after logger initialized: SetLoggerError(())', src/libcore/result.rs:1165:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.


failures:
    tests::privileged_port

test result: FAILED. 3 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

The error is due to initialize_logger is called twice from tests by enabling the privileged_port test.

My suggestion:
moving initialize_logger call from execute() to main() will be the solution. It avoids the error and enable the the privileged_port test.

@ackintosh ackintosh linked a pull request Jan 24, 2020 that will close this issue
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 a pull request may close this issue.

1 participant