Skip to content

Commit e6c4f2d

Browse files
committed
fixes for Eclipse Jenkins environment (adaptopenjdk, shell etc)
Signed-off-by: Maxim Nesen <[email protected]>
1 parent 9de733a commit e6c4f2d

File tree

3 files changed

+8
-2
lines changed
  • test-framework/maven/container-runner-maven-plugin/src/main/resources/runner/gf4
  • tests
    • e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json
    • integration/servlet-2.5-mvc-3/src/test/java/org/glassfish/jersey/tests/integration/servlet_25_mvc_3

3 files changed

+8
-2
lines changed

test-framework/maven/container-runner-maven-plugin/src/main/resources/runner/gf4/download.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fi
4747

4848
if [ "$OVERWRITE" = "true" -o ! -d "$DIST_DIR"/"$DIST_SUBDIR" ]; then
4949
rm -rf "$DIST_DIR"/"$DIST_SUBDIR"
50-
50+
mkdir -p "$DIST_DIR"
5151
unzip -o "$DIST_TGT_LOCATION" -d "$DIST_DIR"
5252
chmod -R 777 "$DIST_DIR"/"$DIST_SUBDIR"
5353
fi

tests/e2e-entity/src/test/java/org/glassfish/jersey/tests/e2e/json/JaxbTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ private static boolean isJavaVersionSupported() {
121121
final Integer minorVersion = (isNumeric(rawMinorVersion)) ? Integer.valueOf(rawMinorVersion) : 0;
122122
return minorVersion < 160 || minorVersion > 172; //only those between 161 and 172 minor
123123
// releases are not supported
124+
} else if (javaVersion.contains("adoptopenjdk")) {
125+
return false; //because that is exactly that case when
126+
// Eclipse Jenkins runs JVM of adoptopenjdk of not supported version
127+
//and we even do not have a chance to recognize that
124128
}
125129
}
126130
return true;

tests/integration/servlet-2.5-mvc-3/src/test/java/org/glassfish/jersey/tests/integration/servlet_25_mvc_3/ItemITCase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
import org.junit.Test;
2626

27+
import java.nio.charset.Charset;
28+
2729
import static org.junit.Assert.assertEquals;
2830
import static org.junit.Assert.assertFalse;
2931
import static org.junit.Assert.assertNotNull;
@@ -64,7 +66,7 @@ public void testResourceAsHtmlIso88592() throws Exception {
6466

6567
assertItemHtmlResponse(htmlIso);
6668
assertFalse("Response shouldn't contain Ha\u0161ek but was: " + htmlIso, htmlIso.contains("Ha\u0161ek"));
67-
assertResponseContains(htmlIso, new String("Ha\u0161ek".getBytes(), "ISO-8859-2"));
69+
assertResponseContains(htmlIso, new String("Ha\u0161ek".getBytes(Charset.forName("UTF-8")), "ISO-8859-2"));
6870
}
6971

7072
@Test

0 commit comments

Comments
 (0)