Skip to content

Commit e7588dd

Browse files
committed
test: revert timeout changes
As the problem seems to be with the Selenium version, this commit reverts the excessive use of `waitFor` added to the Geb tests to trouble-shoot the test problems.
1 parent fa3ad3f commit e7588dd

File tree

7 files changed

+52
-58
lines changed

7 files changed

+52
-58
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ jobs:
4747
run: >
4848
./gradlew
4949
check
50-
--max-workers=1
50+
--max-workers=2
5151
--refresh-dependencies
5252
--continue
53-
--no-parallel
5453
-PgebAtCheckWaiting
5554
functionalTests:
5655
if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}

plugin-acl/examples/functional-test-app/src/integration-test/groovy/test/AdminFunctionalSpec.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class AdminFunctionalSpec extends AbstractSecuritySpec {
7171
go("report/show?number=$i")
7272

7373
then:
74-
waitFor(20, 1) { pageSource.contains("report$i") } // Wait for slow CI environments
74+
pageSource.contains("report$i")
7575

7676
where:
7777
i << (1..100)

plugin-acl/examples/functional-test-app/src/integration-test/groovy/test/User1FunctionalSpec.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class User1FunctionalSpec extends AbstractSecuritySpec {
7070
go("report/show?number=$i")
7171
7272
then:
73-
waitFor(20, 1) { pageSource.contains("report$i") } // Wait for slow CI environments
73+
pageSource.contains("report$i")
7474
7575
where:
7676
i << (1..67)
@@ -81,7 +81,7 @@ class User1FunctionalSpec extends AbstractSecuritySpec {
8181
go("report/show?number=$i")
8282
8383
then:
84-
waitFor(20, 1) { pageSource.contains('Access Denied') } // Wait for slow CI environments
84+
pageSource.contains('Access Denied')
8585
8686
where:
8787
i << (68..100)
@@ -162,7 +162,7 @@ class User1FunctionalSpec extends AbstractSecuritySpec {
162162
grantPage.grantButton.click()
163163
164164
then:
165-
waitFor { pageSource.contains('Access Denied') }
165+
pageSource.contains('Access Denied')
166166
}
167167
168168
void 'edit report 20'() {
@@ -178,6 +178,6 @@ class User1FunctionalSpec extends AbstractSecuritySpec {
178178
editPage.updateButton.click()
179179
180180
then:
181-
waitFor { pageSource.contains('Access Denied') }
181+
pageSource.contains('Access Denied')
182182
}
183183
}

plugin-acl/examples/functional-test-app/src/integration-test/groovy/test/User2FunctionalSpec.groovy

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class User2FunctionalSpec extends AbstractSecuritySpec {
4141
go("report/show?number=$i")
4242
4343
then:
44-
waitFor(20, 1) { pageSource.contains("report$i") } // Wait for slow CI environments
44+
pageSource.contains("report$i")
4545
4646
where:
4747
i << (1..5)
@@ -52,7 +52,7 @@ class User2FunctionalSpec extends AbstractSecuritySpec {
5252
go("report/show?number=$i")
5353
5454
then:
55-
waitFor(20, 1) { pageSource.contains('Access Denied') } // Wait for slow CI environments
55+
pageSource.contains('Access Denied')
5656
5757
where:
5858
i << (6..100)
@@ -64,15 +64,15 @@ class User2FunctionalSpec extends AbstractSecuritySpec {
6464
go('report/edit?number=11')
6565
6666
then:
67-
waitFor { pageSource.contains('Access Denied') }
67+
pageSource.contains('Access Denied')
6868
}
6969
7070
void 'delete report 1'() {
7171
when:
7272
go('report/delete?number=1')
7373
7474
then:
75-
waitFor { pageSource.contains('Access Denied') }
75+
pageSource.contains('Access Denied')
7676
}
7777
7878
void 'grant edit 2'() {
@@ -89,7 +89,7 @@ class User2FunctionalSpec extends AbstractSecuritySpec {
8989
grantPage.grantButton.click()
9090
9191
then:
92-
waitFor { pageSource.contains('Access Denied') }
92+
pageSource.contains('Access Denied')
9393
}
9494
9595
void 'edit report 5'() {
@@ -115,47 +115,41 @@ class User2FunctionalSpec extends AbstractSecuritySpec {
115115
go('report/list')
116116
117117
then:
118-
waitFor {
119-
pageSource.contains('report1')
120-
!pageSource.contains('report6')
121-
}
118+
pageSource.contains('report1')
119+
!pageSource.contains('report6')
122120
123121
when:
124122
go('report/list?offset=80&max=10')
125123
126124
then:
127-
waitFor {
128-
pageSource.contains('Next')
129-
!pageSource.contains('report85')
130-
}
125+
pageSource.contains('Next')
126+
!pageSource.contains('report85')
131127
}
132128
133129
void 'check tags'() {
134130
when:
135131
go('tagLibTest/test')
136132
137133
then:
138-
waitFor {
139-
pageSource.contains('test 1 true 1')
140-
pageSource.contains('test 2 true 1')
141-
pageSource.contains('test 3 true 1')
142-
pageSource.contains('test 4 true 1')
143-
pageSource.contains('test 5 true 1')
144-
pageSource.contains('test 6 true 1')
145-
146-
pageSource.contains('test 1 false 13')
147-
pageSource.contains('test 2 false 13')
148-
pageSource.contains('test 3 false 13')
149-
pageSource.contains('test 4 false 13')
150-
pageSource.contains('test 5 false 13')
151-
pageSource.contains('test 6 false 13')
152-
153-
pageSource.contains('test 1 false 80')
154-
pageSource.contains('test 2 false 80')
155-
pageSource.contains('test 3 false 80')
156-
pageSource.contains('test 4 false 80')
157-
pageSource.contains('test 5 false 80')
158-
pageSource.contains('test 6 false 80')
159-
}
134+
pageSource.contains('test 1 true 1')
135+
pageSource.contains('test 2 true 1')
136+
pageSource.contains('test 3 true 1')
137+
pageSource.contains('test 4 true 1')
138+
pageSource.contains('test 5 true 1')
139+
pageSource.contains('test 6 true 1')
140+
141+
pageSource.contains('test 1 false 13')
142+
pageSource.contains('test 2 false 13')
143+
pageSource.contains('test 3 false 13')
144+
pageSource.contains('test 4 false 13')
145+
pageSource.contains('test 5 false 13')
146+
pageSource.contains('test 6 false 13')
147+
148+
pageSource.contains('test 1 false 80')
149+
pageSource.contains('test 2 false 80')
150+
pageSource.contains('test 3 false 80')
151+
pageSource.contains('test 4 false 80')
152+
pageSource.contains('test 5 false 80')
153+
pageSource.contains('test 6 false 80')
160154
}
161155
}

plugin-core/examples/functional-test-app/src/integration-test/groovy/specs/BasicAuthSecuritySpec.groovy

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class BasicAuthSecuritySpec extends AbstractSecuritySpec {
211211
login('admin1', 'password1')
212212

213213
then:
214-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
214+
pageSource.contains('you have ROLE_ADMIN')
215215

216216
when:
217217
logout()
@@ -224,7 +224,7 @@ class BasicAuthSecuritySpec extends AbstractSecuritySpec {
224224
login('admin1', 'password1')
225225

226226
then:
227-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
227+
pageSource.contains('you have ROLE_ADMIN')
228228

229229
when:
230230
logout()
@@ -237,35 +237,35 @@ class BasicAuthSecuritySpec extends AbstractSecuritySpec {
237237
login('admin1', 'password1')
238238

239239
then:
240-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
240+
pageSource.contains('you have ROLE_ADMIN')
241241

242242
when:
243243
logout()
244244
getWithAuth('secureClassAnnotated', 'admin1', 'password1')
245245

246246
then:
247-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
247+
pageSource.contains('you have ROLE_ADMIN')
248248

249249
when:
250250
logout()
251251
getWithAuth('secureClassAnnotated/index', 'admin1', 'password1')
252252

253253
then:
254-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
254+
pageSource.contains('you have ROLE_ADMIN')
255255

256256
when:
257257
logout()
258258
getWithAuth('secureClassAnnotated/otherAction', 'admin1', 'password1')
259259

260260
then:
261-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
261+
pageSource.contains('you have ROLE_ADMIN')
262262

263263
when:
264264
logout()
265265
getWithAuth('secureClassAnnotated/admin2', 'admin1', 'password1')
266266

267267
then:
268-
waitFor { pageSource.contains('Error 403 Forbidden') }
268+
pageSource.contains('Error 403 Forbidden')
269269
}
270270

271271
void 'check allowed for admin2'() {
@@ -282,7 +282,7 @@ class BasicAuthSecuritySpec extends AbstractSecuritySpec {
282282
login('admin2', 'password2')
283283

284284
then:
285-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
285+
pageSource.contains('you have ROLE_ADMIN')
286286

287287
when:
288288
logout()
@@ -295,7 +295,7 @@ class BasicAuthSecuritySpec extends AbstractSecuritySpec {
295295
login('admin2', 'password2')
296296

297297
then:
298-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
298+
pageSource.contains('you have ROLE_ADMIN')
299299

300300
when:
301301
logout()
@@ -308,35 +308,35 @@ class BasicAuthSecuritySpec extends AbstractSecuritySpec {
308308
login('admin2', 'password2')
309309

310310
then:
311-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
311+
pageSource.contains('you have ROLE_ADMIN')
312312

313313
when:
314314
logout()
315315
getWithAuth('secureClassAnnotated', 'admin2', 'password2')
316316

317317
then:
318-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
318+
pageSource.contains('you have ROLE_ADMIN')
319319

320320
when:
321321
logout()
322322
getWithAuth('secureClassAnnotated/index', 'admin2', 'password2')
323323

324324
then:
325-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
325+
pageSource.contains('you have ROLE_ADMIN')
326326

327327
when:
328328
logout()
329329
getWithAuth('secureClassAnnotated/otherAction', 'admin2', 'password2')
330330

331331
then:
332-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
332+
pageSource.contains('you have ROLE_ADMIN')
333333

334334
when:
335335
logout()
336336
getWithAuth('secureClassAnnotated/admin2', 'admin2', 'password2')
337337

338338
then:
339-
waitFor { pageSource.contains('you have ROLE_ADMIN') }
339+
pageSource.contains('you have ROLE_ADMIN')
340340
}
341341

342342
protected void logout() {

plugin-ui/examples/simple/src/integration-test/groovy/page/SearchPage.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ package page
2222
abstract class SearchPage extends AbstractSecurityPage {
2323

2424
static at = { title == "${typeName()} Search" }
25+
static atCheckWaiting = true
2526
static content = {
2627
form { $('search') }
2728
submitBtn { $('a', id: 'searchButton') }

plugin-ui/examples/simple/src/integration-test/groovy/spec/RegisterSpec.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class RegisterSpec extends AbstractSecuritySpec {
120120
}
121121

122122
then:
123-
waitFor { pageSource.contains('Your account registration email was sent - check your mail!') }
123+
pageSource.contains('Your account registration email was sent - check your mail!')
124124
1 == server.receivedEmailSize
125125

126126
when:
@@ -145,7 +145,7 @@ class RegisterSpec extends AbstractSecuritySpec {
145145
go("register/verifyRegistration?t=$code")
146146

147147
then:
148-
waitFor { pageSource.contains('Your registration is complete') }
148+
pageSource.contains('Your registration is complete')
149149

150150
when:
151151
logout()

0 commit comments

Comments
 (0)