Skip to content

Commit 1fd38f2

Browse files
author
Juraj Veverka
committed
integration tests fixed, bumped jetty version
1 parent 55f0c4e commit 1fd38f2

File tree

6 files changed

+41
-12
lines changed

6 files changed

+41
-12
lines changed

jetty-servlet4-http2/README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,26 @@ See also attached postman [file](docs/jetty-http2.postman_collection.json).
3333
## TODO
3434
Http2 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+
```

jetty-servlet4-http2/build.gradle

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,29 @@ mainClassName = 'itx.examples.jetty.server.Main'
66

77
applicationDefaultJvmArgs = ["-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'
1313
def jerseyVersion = '2.27'
1414
def slf4jVersion = '1.8.0-beta2'
1515

1616
repositories {
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+
2032
dependencies {
2133
compile "org.eclipse.jetty:jetty-server:${jettyVersion}"
2234
compile "org.eclipse.jetty:jetty-servlet:${jettyVersion}"

jetty-servlet4-http2/src/test/java/itx/examples/jetty/tests/http11/EchoServiceTest.java renamed to jetty-servlet4-http2/src/test/java/itx/examples/jetty/tests/http11/EchoServiceITTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import java.security.KeyStore;
1010

11-
public class EchoServiceTest {
11+
public class EchoServiceITTest {
1212

1313
@Test
1414
public void echoTestHttp() throws Exception {

jetty-servlet4-http2/src/test/java/itx/examples/jetty/tests/http11/SystemInfoTest.java renamed to jetty-servlet4-http2/src/test/java/itx/examples/jetty/tests/http11/SystemInfoITTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import java.security.KeyStore;
1111

12-
public class SystemInfoTest {
12+
public class SystemInfoITTest {
1313

1414
@Test
1515
public void getSystemInfoTestHttp() {

jetty-servlet4-http2/src/test/java/itx/examples/jetty/tests/http20/EchoServiceTest.java renamed to jetty-servlet4-http2/src/test/java/itx/examples/jetty/tests/http20/EchoServiceITTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import java.util.Arrays;
1010
import java.util.List;
1111

12-
public class EchoServiceTest {
12+
public class EchoServiceITTest {
1313

1414
@Test
1515
public void echoTest() throws Exception {

jetty-servlet4-http2/src/test/java/itx/examples/jetty/tests/http20/SystemInfoTest.java renamed to jetty-servlet4-http2/src/test/java/itx/examples/jetty/tests/http20/SystemInfoITTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import java.security.KeyStore;
1010

11-
public class SystemInfoTest {
11+
public class SystemInfoITTest {
1212

1313
@Test
1414
public void getSystemInfoTest() throws Exception {

0 commit comments

Comments
 (0)