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

t0060: reactivate daemon tests #896

Merged
merged 1 commit into from
Mar 10, 2015
Merged

Conversation

chriscool
Copy link
Contributor

This is a solution to issue #886 (Fix or discard t0060-daemon.sh?)

Tests in this script had been deactivated because
there was no good way to wait until the daemon was
ready. Now that we can use pollEndpoint for that
it's time to reactivate the tests.

License: MIT
Signed-off-by: Christian Couder chriscool@tuxfamily.org

@btc btc added the status/in-progress In progress label Mar 8, 2015
@chriscool
Copy link
Contributor Author

On Travis there is the following error:

expecting success:
STARTFILE="ipfs cat /ipfs/$HASH_WELCOME_DOCS/readme" &&
echo "Initializing daemon..." >expected &&
echo "initializing ipfs node at $IPFS_PATH" >>expected &&
echo "generating 4096-bit RSA keypair...done" >>expected &&
echo "peer identity: $PEERID" >>expected &&
echo "to get started, enter:" >>expected &&
printf "\\n\\t$STARTFILE\\n\\n" >>expected &&
echo "API server listening on /ip4/127.0.0.1/tcp/5001" >>expected &&
echo "Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080" >>expected &&
test_cmp_repeat_10_sec expected actual_daemon

> diff -u expected actual_daemon
--- expected 2015-03-08 21:07:09.351329281 +0000
+++ actual_daemon 2015-03-08 21:07:09.011347273 +0000
@@ -6,5 +6,4 @@

ipfs cat /ipfs/QmV9E5oNhFDWeRV8NQ91G7vp3pvff2S4UYkn89T5koSzqo/readme
-API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080

not ok 5 - ipfs daemon output looks good

On my Linux machine I get a line like:

API server listening on /ip4/127.0.0.1/tcp/5001

but it looks like on Travis there is no such line printed...

@jbenet
Copy link
Member

jbenet commented Mar 9, 2015

It should definitely show up. Maybe it's not waiting the full amount of time--

It's also possible this is the same problem that was plaguing me with my approach to waiting for the daemon (before @cryptix's pollEndpoint saved the day) -- which would be a bug. the daemon must output the API line.

If we don't suss out the problem quickly, it may not be worth worrying about-- we can maybe mark that line as a known breakage in sharness -- as we hope to rewrite how the daemon spins up in the next few weeks.

@chriscool
Copy link
Contributor Author

Ok, I will resend with test_expect_failure for this test. Thanks!

Tests in this script had been deactivated because
there was no good way to wait until the daemon was
ready. Now that we can use pollEndpoint for that
it's time to reactivate the tests.

License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
@chriscool chriscool force-pushed the t0060_reactivate_daemon_tests branch from b998b74 to 37bfef8 Compare March 10, 2015 14:42
@chriscool
Copy link
Contributor Author

Resent with one test_expect_failure. The Jenkins network-test failed but it is not related.

@jbenet
Copy link
Member

jbenet commented Mar 10, 2015

the network test passed (3nodetest> success) something is wrong with the script detecting success.

jbenet added a commit that referenced this pull request Mar 10, 2015
@jbenet jbenet merged commit 90d2113 into master Mar 10, 2015
@jbenet jbenet removed the status/in-progress In progress label Mar 10, 2015
@jbenet jbenet deleted the t0060_reactivate_daemon_tests branch March 10, 2015 22:55
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.

3 participants