Commit 18e3e22
perf(flagd): parallelize e2e scenarios via container pool
Replace the single shared ComposeContainer with a pool of pre-warmed
containers (ContainerPool). Each Cucumber scenario borrows its own
ContainerEntry (ComposeContainer + dedicated temp dir) and returns it
after teardown, giving full isolation across parallel scenarios:
- No shared flagd process: /start, /stop, /restart, /change operations
in one scenario cannot affect any other scenario.
- Pool initialized once in @BeforeAll with all N containers started in
parallel, so startup cost (~45s) is paid once regardless of pool size.
- ContainerEntry carries its own temp dir, isolating FILE resolver socket
paths and flag file paths per scenario.
- State.containerEntry replaces the previous static container/sharedTempDir
fields in ProviderSteps, making the container reference per-scenario.
- junit-platform.properties enables cucumber.execution.parallel with
fixed parallelism=4 matching the default pool size.
Pool size is tunable via -Dflagd.e2e.pool.size=N.
Expected cumulative improvement after this + Surefire forkCount=3:
Before: ~264s (4:24) — sequential runners, sequential scenarios
Phase 1: ~130s (2:10) — parallel runners (forkCount=3)
Phase 2: ~60-80s (1:00-1:20) — parallel scenarios within each runner
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 921bb09 commit 18e3e22
File tree
5 files changed
+172
-46
lines changed- providers/flagd/src/test
- java/dev/openfeature/contrib/providers/flagd/e2e
- steps
- resources
5 files changed
+172
-46
lines changedLines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
Lines changed: 75 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
providers/flagd/src/test/java/dev/openfeature/contrib/providers/flagd/e2e/steps/ProviderSteps.java
Lines changed: 36 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | 22 | | |
27 | | - | |
28 | | - | |
29 | 23 | | |
30 | 24 | | |
31 | | - | |
32 | 25 | | |
33 | 26 | | |
34 | 27 | | |
35 | 28 | | |
36 | 29 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | 30 | | |
42 | 31 | | |
43 | 32 | | |
44 | 33 | | |
45 | 34 | | |
46 | 35 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 36 | + | |
| 37 | + | |
59 | 38 | | |
60 | 39 | | |
61 | 40 | | |
62 | | - | |
63 | | - | |
64 | | - | |
| 41 | + | |
| 42 | + | |
65 | 43 | | |
66 | 44 | | |
67 | 45 | | |
68 | 46 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
73 | 55 | | |
74 | 56 | | |
75 | 57 | | |
| |||
78 | 60 | | |
79 | 61 | | |
80 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
81 | 66 | | |
82 | 67 | | |
83 | 68 | | |
| |||
87 | 72 | | |
88 | 73 | | |
89 | 74 | | |
90 | | - | |
91 | 75 | | |
92 | 76 | | |
93 | 77 | | |
94 | 78 | | |
95 | 79 | | |
96 | | - | |
| 80 | + | |
97 | 81 | | |
98 | 82 | | |
99 | 83 | | |
100 | 84 | | |
101 | | - | |
102 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
103 | 89 | | |
104 | 90 | | |
105 | 91 | | |
106 | 92 | | |
107 | 93 | | |
108 | | - | |
109 | 94 | | |
110 | 95 | | |
111 | 96 | | |
| |||
117 | 102 | | |
118 | 103 | | |
119 | 104 | | |
120 | | - | |
121 | 105 | | |
122 | 106 | | |
123 | 107 | | |
124 | 108 | | |
125 | | - | |
126 | 109 | | |
127 | 110 | | |
128 | | - | |
| 111 | + | |
| 112 | + | |
129 | 113 | | |
130 | 114 | | |
131 | 115 | | |
| |||
137 | 121 | | |
138 | 122 | | |
139 | 123 | | |
140 | | - | |
141 | 124 | | |
142 | 125 | | |
143 | | - | |
| 126 | + | |
144 | 127 | | |
145 | 128 | | |
146 | 129 | | |
| |||
155 | 138 | | |
156 | 139 | | |
157 | 140 | | |
158 | | - | |
| 141 | + | |
| 142 | + | |
159 | 143 | | |
160 | 144 | | |
161 | 145 | | |
162 | 146 | | |
163 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
164 | 151 | | |
165 | 152 | | |
166 | 153 | | |
| |||
182 | 169 | | |
183 | 170 | | |
184 | 171 | | |
185 | | - | |
| 172 | + | |
186 | 173 | | |
187 | 174 | | |
188 | 175 | | |
189 | 176 | | |
190 | 177 | | |
191 | 178 | | |
192 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
193 | 183 | | |
194 | 184 | | |
195 | 185 | | |
196 | 186 | | |
197 | 187 | | |
198 | 188 | | |
199 | | - | |
| 189 | + | |
200 | 190 | | |
201 | 191 | | |
202 | 192 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments