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

[circleci] parallelize Test::Nginx suite #506

Merged
merged 4 commits into from
Nov 30, 2017
Merged

[circleci] parallelize Test::Nginx suite #506

merged 4 commits into from
Nov 30, 2017

Conversation

mikz
Copy link
Contributor

@mikz mikz commented Nov 28, 2017

Reduces CircleCI prove from 53 to 13s.
Automatically runs prove in parallel when nproc is available. And make prove will run tests in randomized directories and ports.

To achieve this all tests need to allocate a random port to listen on. That includes the TCP/UDP servers provided by Test::Nginx to stub DNS server.

The environment configuration can now configure echo/management/backend ports:

return {
  port = {
      apicast = '8080',
      management = '8090',
      backend = '8081',
      echo = '8081',
    },
}

@davidor
Copy link
Contributor

davidor commented Nov 28, 2017

So maybe we should wait until we solve the problem before merging this, right?

@mikz
Copy link
Contributor Author

mikz commented Nov 28, 2017

Sure, this can't be merged right now.

@davidor davidor changed the title [circleci] parallelize Test::Nginx suite [don't merge] [circleci] parallelize Test::Nginx suite Nov 28, 2017
@mikz mikz force-pushed the circle-parallel branch 5 times, most recently from bc40dc2 to 2b38762 Compare November 30, 2017 08:47
@mikz mikz changed the title [don't merge] [circleci] parallelize Test::Nginx suite [circleci] parallelize Test::Nginx suite Nov 30, 2017
Every test run needs unique randomized ports.
* so there is just one way to run tests
* and it will be ran parallel automatically
Copy link
Contributor

@davidor davidor left a comment

Choose a reason for hiding this comment

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

Great! 👍

@mikz mikz merged commit 0697b47 into master Nov 30, 2017
@mikz mikz deleted the circle-parallel branch November 30, 2017 12:52
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.

2 participants