File tree Expand file tree Collapse file tree 6 files changed +41
-12
lines changed
src/test/java/itx/examples/jetty/tests Expand file tree Collapse file tree 6 files changed +41
-12
lines changed Original file line number Diff line number Diff line change @@ -33,9 +33,26 @@ See also attached postman [file](docs/jetty-http2.postman_collection.json).
3333## TODO
3434Http2 stream full-duplex communication is not fully implemented for MassageService.
3535
36- ## Build and Run - Java 11
37- Build from commandline: ``` gradle clean installDist distZip ```
38- Run server: ``` ./build/install/jetty-servlet4-http2/bin/jetty-servlet4-http2 ```
36+ ## Build and Run
37+ Build from commandline:
38+ ```
39+ gradle clean build installDist distZip
40+ ```
41+
42+ Run server:
43+ ```
44+ ./build/install/jetty-servlet4-http2/bin/jetty-servlet4-http2
45+ ```
3946
40- ### UnitTesting
41- First start server manually, than start unit integration tests.
47+ ### Run Integration Tests
48+ Integration tests in this demo are designed to run as http client against running server instance.
49+ It is expected that server runs on localhost, ports 8080 for http and 8443 for https.
50+ Follow this procedure to run integration tests:
51+ 1 . Start server manually in new terminal window.
52+ ```
53+ ./build/install/jetty-servlet4-http2/bin/jetty-servlet4-http2
54+ ```
55+ 2 . Start unit integration tests in new terminal window.
56+ ```
57+ gradle clean test -Dtest.profile=integration
58+ ```
Original file line number Diff line number Diff line change @@ -6,17 +6,29 @@ mainClassName = 'itx.examples.jetty.server.Main'
66
77applicationDefaultJvmArgs = [" -Xms64M" , " -Xmx64M" ]
88
9- sourceCompatibility = 11
10- targetCompatibility = 11
9+ sourceCompatibility = 10
10+ targetCompatibility = 10
1111
12- def jettyVersion = ' 9.4.11.v20180605 '
12+ def jettyVersion = ' 9.4.12.RC2 '
1313def jerseyVersion = ' 2.27'
1414def slf4jVersion = ' 1.8.0-beta2'
1515
1616repositories {
1717 mavenCentral()
1818}
1919
20+ test {
21+ useTestNG()
22+ // testLogging.showStandardStreams = true
23+ testLogging {
24+ events " passed" , " skipped" , " failed"
25+ }
26+
27+ if (System . properties[' test.profile' ] != ' integration' ) {
28+ exclude ' **/*ITTest*'
29+ }
30+ }
31+
2032dependencies {
2133 compile " org.eclipse.jetty:jetty-server:${ jettyVersion} "
2234 compile " org.eclipse.jetty:jetty-servlet:${ jettyVersion} "
Original file line number Diff line number Diff line change 88
99import java .security .KeyStore ;
1010
11- public class EchoServiceTest {
11+ public class EchoServiceITTest {
1212
1313 @ Test
1414 public void echoTestHttp () throws Exception {
Original file line number Diff line number Diff line change 99
1010import java .security .KeyStore ;
1111
12- public class SystemInfoTest {
12+ public class SystemInfoITTest {
1313
1414 @ Test
1515 public void getSystemInfoTestHttp () {
Original file line number Diff line number Diff line change 99import java .util .Arrays ;
1010import java .util .List ;
1111
12- public class EchoServiceTest {
12+ public class EchoServiceITTest {
1313
1414 @ Test
1515 public void echoTest () throws Exception {
Original file line number Diff line number Diff line change 88
99import java .security .KeyStore ;
1010
11- public class SystemInfoTest {
11+ public class SystemInfoITTest {
1212
1313 @ Test
1414 public void getSystemInfoTest () throws Exception {
You can’t perform that action at this time.
0 commit comments