Commit fda8483
refactor(systemtest): Share KMS facades across RecordEncryptionST tests (kroxylicious#3703)
* perf(systemtest): Share KMS facades across RecordEncryptionST tests
Apply the shared KMS facade pattern from PR kroxylicious#3681 and kroxylicious#3700 to
RecordEncryptionST. This starts each KMS facade once and shares it
across all tests in the class, rather than starting/stopping for
each test method.
Changes:
- Replace @testtemplate + TestKubeKmsFacadeInvocationContextProvider
with @ParameterizedClass and @MethodSource
- Add facadesSource() method using lazy stream evaluation with .peek()
- Use autoCloseArguments = true for automatic facade cleanup
- Replace @testtemplate + CompressionTypeInvocationContextProvider
with @ParameterizedTest + @EnumSource(CompressionType.class) for
compression testing
This approach allows three different parameter injection mechanisms
to work together:
- testKmsFacade from @parameter field (via @ParameterizedClass)
- namespace from KroxyliciousExtension (via AbstractSystemTests)
- compressionType from @EnumSource (via @ParameterizedTest)
Expected performance improvement: ~60% faster overall execution based
on similar changes to KmsIT (kroxylicious#3700) which showed 60% overall improvement
and 96.4% faster test execution for container-based KMS providers.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Keith Wall <kwall@apache.org>
* reorder to allow parameter resolution to work.
Signed-off-by: Keith Wall <kwall@apache.org>
---------
Signed-off-by: Keith Wall <kwall@apache.org>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 8013e90 commit fda8483
4 files changed
Lines changed: 37 additions & 195 deletions
File tree
- kroxylicious-systemtests/src
- main/java/io/kroxylicious/systemtests/installation/kms/aws
- test/java/io/kroxylicious/systemtests
- extensions
- filters
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
81 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | 87 | | |
| |||
Lines changed: 0 additions & 90 deletions
This file was deleted.
Lines changed: 0 additions & 82 deletions
This file was deleted.
kroxylicious-systemtests/src/test/java/io/kroxylicious/systemtests/filters/RecordEncryptionST.java
Lines changed: 33 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | | - | |
32 | | - | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| 51 | + | |
| 52 | + | |
47 | 53 | | |
48 | 54 | | |
49 | 55 | | |
| |||
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
56 | 75 | | |
57 | 76 | | |
58 | 77 | | |
| |||
103 | 122 | | |
104 | 123 | | |
105 | 124 | | |
106 | | - | |
107 | | - | |
108 | | - | |
| 125 | + | |
| 126 | + | |
109 | 127 | | |
110 | 128 | | |
111 | 129 | | |
| |||
139 | 157 | | |
140 | 158 | | |
141 | 159 | | |
142 | | - | |
143 | | - | |
144 | 160 | | |
| 161 | + | |
145 | 162 | | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
153 | 166 | | |
154 | 167 | | |
155 | 168 | | |
| |||
177 | 190 | | |
178 | 191 | | |
179 | 192 | | |
180 | | - | |
181 | | - | |
182 | | - | |
| 193 | + | |
| 194 | + | |
183 | 195 | | |
184 | 196 | | |
185 | 197 | | |
| |||
244 | 256 | | |
245 | 257 | | |
246 | 258 | | |
247 | | - | |
248 | | - | |
249 | | - | |
| 259 | + | |
| 260 | + | |
250 | 261 | | |
251 | 262 | | |
252 | 263 | | |
| |||
0 commit comments