Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Rename tests, parallel tests, one elasticsearch replica, readiness probe #50

Merged
merged 15 commits into from
Oct 17, 2017

Conversation

pavolloffay
Copy link
Member

@pavolloffay pavolloffay commented Oct 11, 2017

related to #44

  • rename tests
  • use travis stages for parallel builds
  • use one ES replica no two. It seems that data between ES nodes were not synchronized properly, therefore reverting the change.
  • update nsenster

Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
@pavolloffay
Copy link
Member Author

ES tests are passing when cassandra tests are disabled.

I have introduced travis stages to run tests in parallel. Now it seems that it works fine.

@pavolloffay
Copy link
Member Author

I am restarting the build to be sure :)

Copy link
Collaborator

@jpkrohling jpkrohling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to the README requires a clarification. Other than that, this can be merged once Travis approves this PR.

@@ -109,7 +109,7 @@ kubernetes cluster (via `kubectl`). When executing tests from IDE make sure that

```bash
minikube start
./mvnw clean verify -Pe2e
./mvnw clean verify -Pcassandra,elasticsearch,all-in-one
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ES tests are passing when cassandra tests are disabled.

Should one expect this command to finish successfully, or will this fail as per your comment on the PR ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

locally it passes fine, the problem is with travis.

This is a one liner to run everything

Signed-off-by: Pavol Loffay <[email protected]>
@@ -35,7 +36,9 @@
* 2. jaeger-query returns 500 is ES storage is empty (without indices) https://github.com/jaegertracing/jaeger/issues/464
*/
@Before
public void before() {
public void before() throws InterruptedException {
TimeUnit.SECONDS.sleep(8);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is not ready for review, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not ready, it is still failing

@pavolloffay
Copy link
Member Author

I think the main here is actually two replicas. What happens is that one server has data and the other no

Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
@pavolloffay
Copy link
Member Author

@jpkrohling this is ready to review. See the PR description for changes.

@pavolloffay pavolloffay changed the title Rename tests and minor refactor Rename tests, parallel tests, one elasticsearch replica Oct 12, 2017

/**
* We need to initialize ES storage, before we proceed to tests for two reasons:
* 1. sometimes first span is not stored
* 2. jaeger-query returns 500 is ES storage is empty (without indices) https://github.com/jaegertracing/jaeger/issues/464
*/
@Before
public void before() {
public void before() throws InterruptedException {
TimeUnit.SECONDS.sleep(15);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope :) It's better to ping for something from time to time than just sleeping for a long time and hoping it will be enough. Besides, waiting 15 seconds won't scale: if you have 10 tests, that's already two and a half minutes of just waiting...

As the only test on this class is being ignored, can't you just remove this @Before entirely? Or even the whole test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow I forgot to remove this sleep statement.

As the only test on this class is being ignored, can't you just remove this @before entirely? Or even the whole test?

The class extends different test class. Before is still needed.


@Ignore("dependency links returns 404 because of old Cassandra image")
@Ignore("It requires spark job")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: if the only test is being ignored, can't you just remove the whole test class?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, test class extends base test class with other tests.

Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
@pavolloffay
Copy link
Member Author

Readiness probe for ES has been added. Tests still sometimes fail on travis. Maybe it's just unstable travis environment or something with arquillian-cube. However now with travis stages can clearly see which template failed and restart only that.

@jpkrohling
Copy link
Collaborator

Tests still sometimes fail on travis.

I'd rather than just remove this and have a proper fix (proper environment, more resilient test... ) . Unstable tests are a "broken window"[1] and a distraction. We'll eventually just ignore the failure and not know when something wrong really happens.

1 - Broken windows theory

@pavolloffay
Copy link
Member Author

I'd rather than just remove this and have a proper fix (proper environment, more resilient test... )

I am not sure what you suggest can be achieved in reasonable time. Can you setup a proper k8s cluster for tests? Because I can't. Let's keep the issue about tests open and move this forward? This is improvement against current master.

@pavolloffay
Copy link
Member Author

I would rather restart tests if necessary than have no tests or disable them.

@jpkrohling
Copy link
Collaborator

I don't have time, but introducing a test with intermittent failures is really a bad idea. Merge if you will, I won't block this merge, but I still think it's a terrible idea :)

@pavolloffay
Copy link
Member Author

The problem is that travis environment is not stable. It's not failing only here but also in other Jaeger repositories (e.g. Jaeger main repo xdock tests, all-in-one).

I am fine with restarting the build rather than not having tests at all. I will merge and keep the issue for tests open.

@pavolloffay pavolloffay merged commit c586dba into jaegertracing:master Oct 17, 2017
@pavolloffay pavolloffay changed the title Rename tests, parallel tests, one elasticsearch replica Rename tests, parallel tests, one elasticsearch replica, readiness probe Oct 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants