Skip to content

Commit

Permalink
tests(balancer) increase speed and reliability of balancer tests
Browse files Browse the repository at this point in the history
* Removes timed dependencies based on `ngx.sleep`: using the
  new `/health` endpoint, we can poll-wait on health changes and
  write tests that are timing-independent
* Avoids restarting Kong on every test: instead, this generates
  unique ids so that each test works on different entities.

Local results show a speed up from ~1min26s down to ~11s.

The wrapper `describe` block is left unintented in the `spec-old-api` version
to reduce `git diff` and to make the actual changes clearer (otherwise the
whole file would be marked as changed). The one in `spec` is the one we
will want to keep long-term and that one has been indented properly.

(Eventually we should remove the "postgres, cassandra" iteration from
inside the tests anyway and just run one of each database in separate Travis
jobs.)
  • Loading branch information
hishamhm authored and thibaultcha committed Mar 27, 2018
1 parent f08e656 commit d123d1f
Show file tree
Hide file tree
Showing 3 changed files with 1,934 additions and 2,144 deletions.
Loading

0 comments on commit d123d1f

Please sign in to comment.