Skip to content

Even faster e2e - #2111

Merged
vkuznecovas merged 3 commits into
masterfrom
faster-e2e
Apr 27, 2020
Merged

Even faster e2e#2111
vkuznecovas merged 3 commits into
masterfrom
faster-e2e

Conversation

@vkuznecovas

@vkuznecovas vkuznecovas commented Apr 24, 2020

Copy link
Copy Markdown
Contributor

E2e now starts multiple consumers, these then connect to the provider simultaneously. This mimics the real world scenario more closely.

Had to refactor accountant promise handling flow, as this caused insane races. To fix it, moved all the accountant promise logic to a new component: accountant_promise_handler.go. It will handle the promises sequentially and avoid race conditions.

Time savings:
After
mage teste2ebasic 32.50s user 17.48s system 24% cpu 3:20.12 total

Before
mage teste2ebasic 45.29s user 18.08s system 21% cpu 4:58.23 total

@vkuznecovas
vkuznecovas force-pushed the faster-e2e branch 3 times, most recently from 8f959c3 to 355c7cd Compare April 24, 2020 11:17

@anjmao anjmao left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Now you can sleep well 😆
Requesting a change as it looks there is a bug in start stop. Please check. Everything looks good.

Comment thread session/pingpong/accountant_promise_handler.go Outdated
Comment thread session/pingpong/accountant_promise_handler.go Outdated
Comment thread session/pingpong/accountant_promise_handler.go
Comment thread session/pingpong/accountant_promise_handler_test.go Outdated
@anjmao
anjmao self-requested a review April 24, 2020 11:53
Previously, each session would try and handle their own accountant promises.

This caused a bunch of race conditions. Now, the sessions each delegate the promise related work to accountant promise handler.
openvpn,noop,wireguard

myst-consumer:
myst-consumer-noop:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lets have one consumer and create sessions from it. Doing consequent connects/disconnect showed bunch of bugs for us.
How to keep testing that?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe additional connect after 1st session?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Actually connects should happen in same container, to catch race bugs for us.
But we can run those connect tests in parallel

@vkuznecovas vkuznecovas Apr 25, 2020

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I leave this as an exercise to the reader. Need a break from e2e for now.

@vkuznecovas
vkuznecovas merged commit df9928a into master Apr 27, 2020
@vkuznecovas
vkuznecovas deleted the faster-e2e branch April 27, 2020 06:49
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