Commit 2b9c41a
committed
Create processes lazily
As mentioned in [1]:
> JUnit creates a new instance of the test class before invoking each
> @test method. This helps provide independence between test methods and
> avoids unintentional side effects in the test code. Because each test
> method runs on a new test class instance, we can’t reuse instance
> variable values across test methods.
Each `@Test` method would create a new instance of the test classes,
which means each `@Test` method would create N new processes.
[1]: https://stackoverflow.com/questions/14010222/junit-new-instance-before-invoking-each-test-method-what-are-the-benefits1 parent 7ca6a47 commit 2b9c41a
1 file changed
+9
-6
lines changedLines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
171 | | - | |
| 170 | + | |
172 | 171 | | |
173 | 172 | | |
174 | 173 | | |
175 | | - | |
| 174 | + | |
176 | 175 | | |
177 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
197 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
| |||
0 commit comments