Commit 1d843ec
committed
Run the isolated tests in the uber suite
Some classes here pollute static state that the rest of the fork would inherit,
so each is given a Test task of its own and excluded from `test`. A Test task
that is registered rather than the one the java plugin creates has neither
testClassesDirs nor classpath, which makes it NO-SOURCE: it reports success
having run nothing. Since `test` excludes those same classes, all forty ran in
no task at all.
This is older than it looks. b156214 rewrote `task x(type: Test)` as
`tasks.register(x, Test)` in November 2023, but both forms are NO-SOURCE -- the
java plugin wires source onto its own `test` task only -- so that commit
inherited the problem rather than causing it. The sharding plugin picks these
tasks up through tasks.withType(Test) and has been distributing empty tasks
across shards ever since.
Two things kept it quiet, and both are fixed here. The tasks ran nothing, and
grails-test-report matches phases by task name, so their results were invisible
to the aggregate reports even when they did run.
What ran for the first time in years mostly passed. Four did not:
RestfulControllerSpec and ResourceAnnotationRestfulControllerSpec assert that
save, update and patch render the create or edit view again for an instance with
errors, and built that instance with an empty title. Binding an empty string
stores null, and a persistent property is nullable by default in Grails 8, so
the instance was valid and the controller redirected instead. Their domains say
`title blank: false`, which meant required under the old default; it now says
`nullable: false` as well, which is what it always meant.1 parent 592b38f commit 1d843ec
4 files changed
Lines changed: 22 additions & 4 deletions
File tree
- grails-test-report
- grails-test-suite-uber
- src/test/groovy/grails/test/mixin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
27 | 40 | | |
28 | 41 | | |
29 | 42 | | |
30 | 43 | | |
31 | 44 | | |
32 | | - | |
| 45 | + | |
33 | 46 | | |
34 | 47 | | |
35 | 48 | | |
| |||
45 | 58 | | |
46 | 59 | | |
47 | 60 | | |
48 | | - | |
| 61 | + | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| |||
0 commit comments