Commit da68130
finatra: fix flaky tests
Problem:
Some of our github actions have been
failing due to the following tests:
In our `InMemoryStatsReceiverUtilityTest`,
by the time we get to the waitFor call,
the metrics have already been updated
too many times.
In `FeatureTestNonInjectionCustomStatsReceiverTest`,
we check that our gauges are nonempty because they
should be populated at startup, but occasionally
the server is not fully started before our check.
Solution:
For `InMemoryStatsReceiverUtilityTest`,
we'll call `waitFor` in its own thread
before adding to stats, counters, gauges
For `FeatureTestNonInjectionCustomStatsReceiverTest`,
we'll wait for the server to complete startup
before running any tests
JIRA Issues: CSL-11274
Differential Revision: https://phabricator.twitter.biz/D7662671 parent cf44ba8 commit da68130
File tree
2 files changed
+14
-8
lines changed- inject
- inject-core/src/test/scala/com/twitter/inject/tests
- inject-server/src/test/scala/com/twitter/inject/server/tests
2 files changed
+14
-8
lines changedLines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
71 | 73 | | |
72 | | - | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
| 81 | + | |
80 | 82 | | |
81 | | - | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
88 | | - | |
| 91 | + | |
89 | 92 | | |
90 | | - | |
| 93 | + | |
| 94 | + | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
97 | | - | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
0 commit comments