question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test failures on initial build

See original GitHub issue

Hello,

I’m prototyping etcd to run our local service discovery.

I’m running Debian 8.0, and using the official Quay Docker image to run etcd.

I’ve started the docker single instance cluster using:

docker run -d -v /usr/share/ca-certificates/:/etc/ssl/certs -p 4001:4001 -p 2380:2380 -p 2379:2379 \
 --name etcd quay.io/coreos/etcd etcd \
 -name etcd0 \
 -advertise-client-urls http://${HostIP}:2379,http://${HostIP}:4001 \
 -listen-client-urls http://0.0.0.0:2379,http://0.0.0.0:4001 \
 -initial-advertise-peer-urls http://${HostIP}:2380 \
 -listen-peer-urls http://0.0.0.0:2380 \
 -initial-cluster-token etcd-cluster-1 \
 -initial-cluster etcd0=http://${HostIP}:2380 \
 -initial-cluster-state new

If I clone the latest coreos/jetcd and run mvn package, I get a test failure:

Tests run: 34, Failures: 2, Errors: 0, Skipped: 3, Time elapsed: 28.542 sec <<< FAILURE! - in TestSuite
testListCluster(com.coreos.jetcd.EtcdClusterClientTest)  Time elapsed: 0.013 sec  <<< FAILURE!
java.lang.AssertionError: Members: 1 expected [3] but found [1]
	at com.coreos.jetcd.EtcdClusterClientTest.testListCluster(EtcdClusterClientTest.java:33)

Is this a known issue?

Also, if I try to run it again, I get that same error, plus a new one:

testGetSortedPrefix(com.coreos.jetcd.EtcdKVTest)  Time elapsed: 0.034 sec  <<< FAILURE!
java.lang.AssertionError: expected [3] but found [4]
	at com.coreos.jetcd.EtcdKVTest.testGetSortedPrefix(EtcdKVTest.java:115)

So as a secondary issue, there may be a need to setup the environment properly.

Thank you, Dustin

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
StupidHodcommented, Dec 6, 2016

Hello, @at88mph After you use testAddMember, there are 2 members in the term. For raft with 2 members, the cluster get a leader only after 2 members all vote to the candidate. You do not have another member, so the cluster get into a endless loop without a leader. The etcd can not work without a leader. You can use the run_etcd.sh to start a 3 nodes cluster for the test. The test is designed to run in the enviroment with 3 nodes that initized with run_etcd.sh.

0reactions
fanminshicommented, Jun 8, 2017

README is updated via https://github.com/coreos/jetcd/pull/72. closing. Thanks @akauppi !

Read more comments on GitHub >

github_iconTop Results From Across the Web

I want a Unit Test Failure not to break build - Stack Overflow
I'm using ant to do my builds, and I'm using TestNG for testing. Is it possible to not have the build fail whenever...
Read more >
How to fail a build on failing unit tests - Platform.sh Community
1. Ensure that your test framework is included in your list of project dependencies · 2. Add set -e as the first line...
Read more >
Viewing Tests and Configuration Problems | TeamCity On ...
TeamCity displays the "First Failure" build for some tests. This is the build where TeamCity detected the first failure of this test for...
Read more >
Fail task of type Test immediately upon encountering first failure
Expose a configuration option for the Test task type for failing upon encountering first failure. The test report indicates the failed test.
Read more >
Troubleshooting Continuous Integration, or How to Debug ...
So don't relaunch the CI build - it's usually a waste of time. There is a good reason the tests failed on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found