File tree Expand file tree Collapse file tree 6 files changed +52
-33
lines changed
testIntegration/groovy/spotty/server Expand file tree Collapse file tree 6 files changed +52
-33
lines changed Original file line number Diff line number Diff line change 2727 if : failure()
2828 with :
2929 name : test-report
30- path : server /build/reports
30+ path : core /build/reports
3131 retention-days : 1
Original file line number Diff line number Diff line change @@ -31,11 +31,13 @@ subprojects {
3131 compileOnly " org.slf4j:slf4j-api:$slf4jApiVersion "
3232 runtimeOnly " ch.qos.logback:logback-classic:$logbackClassicVersion "
3333
34- testImplementation " org.codehaus .groovy:groovy-all:$groovyVersion "
34+ testImplementation " org.apache .groovy:groovy-all:$groovyVersion "
3535 testImplementation " org.spockframework:spock-core:$spockVersion "
36+ testImplementation " org.objenesis:objenesis:$objenesis "
3637
37- testIntegrationImplementation " org.codehaus .groovy:groovy-all:$groovyVersion "
38+ testIntegrationImplementation " org.apache .groovy:groovy-all:$groovyVersion "
3839 testIntegrationImplementation " org.spockframework:spock-core:$spockVersion "
40+ testIntegrationImplementation " org.objenesis:objenesis:$objenesis "
3941 }
4042
4143 test {
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ dependencies {
88 implementation " org.apache.tika:tika-core:$apacheTika "
99
1010 testImplementation " org.apache.commons:commons-lang3:$apacheCommons "
11- testImplementation " org.apache.httpcomponents:httpclient :$apacheHttpClientVersion "
11+ testImplementation " org.apache.httpcomponents.client5:httpclient5 :$apacheHttpClientVersion "
1212 testImplementation " org.awaitility:awaitility:$awaitilityVersion "
1313 testImplementation " com.konghq:unirest-java:$unirestVersion "
1414}
Original file line number Diff line number Diff line change 2424public final class Version implements Comparable <Version >, Serializable {
2525 private static final long serialVersionUID = 1L ;
2626
27- private final int major ;
28- private final int minor ;
29- private final int patch ;
27+ public final int major ;
28+ public final int minor ;
29+ public final int patch ;
3030
3131 private final String toString ;
3232 private final int hash ;
@@ -55,18 +55,6 @@ public static Version parse(String version) {
5555 return new Version (major , minor , patch );
5656 }
5757
58- public int major () {
59- return major ;
60- }
61-
62- public int minor () {
63- return minor ;
64- }
65-
66- public int patch () {
67- return patch ;
68- }
69-
7058 @ Override
7159 public int compareTo (Version version ) {
7260 if (this .equals (version )) {
Original file line number Diff line number Diff line change @@ -22,8 +22,7 @@ class SpottyStartSpec extends Specification {
2222 server. start()
2323
2424 then :
25- ! server. isStarted()
26- ! server. isRunning()
25+ server. isStarted() == false
2726 }
2827
2928 def " should wait until started" () {
@@ -32,8 +31,34 @@ class SpottyStartSpec extends Specification {
3231 server. awaitUntilStart()
3332
3433 then :
35- server. isStarted()
36- server. isRunning()
34+ server. isStarted() == true
35+ }
36+
37+ def " should not wait until stopped" () {
38+ when :
39+ server. start()
40+ server. awaitUntilStart()
41+
42+ server. stop()
43+
44+ then :
45+ server. isStarted() == true
46+ }
47+
48+ def " should wait until stopped" () {
49+ when :
50+ server. start()
51+ server. awaitUntilStart()
52+
53+ then :
54+ server. isStarted() == true
55+
56+ when :
57+ server. stop()
58+ server. awaitUntilStop()
59+
60+ then :
61+ server. isStarted() == false
3762 }
3863
3964}
Original file line number Diff line number Diff line change @@ -8,13 +8,17 @@ group=com.spotty-server
88version =1.0.5
99
1010# dependencies
11- groovyVersion =3.0.10
12- spockVersion =2.2-M1-groovy-3.0
13- slf4jApiVersion =1.7.36
14- logbackClassicVersion =1.2.11
15- unirestVersion =3.13.10
16- apacheHttpClientVersion =4.5.13
17- apacheCommons =3.12.0
18- apacheTika =2.4.1
19- awaitilityVersion =4.2.0
20- googleGuavaVersion =31.1-jre
11+ groovyVersion =4.0.21
12+ spockVersion =2.4-M4-groovy-4.0
13+
14+ # spock requires this dependency
15+ objenesis =3.3
16+
17+ slf4jApiVersion =2.0.13
18+ logbackClassicVersion =1.3.14
19+ unirestVersion =3.14.5
20+ apacheHttpClientVersion =5.3.1
21+ apacheCommons =3.14.0
22+ apacheTika =2.9.2
23+ awaitilityVersion =4.2.1
24+ googleGuavaVersion =33.1.0-jre
You can’t perform that action at this time.
0 commit comments