-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
predicates/traffic: speedup TrafficSegment tests (#2509)
TrafficSegment tests perform 10k test requests per test case. Add `inlineContent("")` to test routes to have `Content-Length: 0` response header that disables chunked encoding and speeds up the tests. Before: ``` go test ./predicates/traffic/ -count=1 -run=TestTrafficSegment ok github.com/zalando/skipper/predicates/traffic 8.928s ``` After: ``` go test ./predicates/traffic/ -count=1 -run=TestTrafficSegment ok github.com/zalando/skipper/predicates/traffic 4.285s ``` To further speedup make test requests in parallel: ``` go test ./predicates/traffic/ -count=1 -run=TestTrafficSegment ok github.com/zalando/skipper/predicates/traffic 1.554s ``` See related #2459 #1562 Signed-off-by: Alexander Yastrebov <[email protected]>
- Loading branch information
1 parent
679e064
commit 91851ea
Showing
1 changed file
with
35 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters