mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-19 23:02:24 +00:00
Support running tests against java 19
This commit is contained in:
1 parent
3bc7f061eb
commit
d9ea465102
1 file changed
+1
-4
+1
-4
@@ -9,7 +9,6 @@ class BasicProfileLocationTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void obtain() {
|
void obtain() {
|
||||||
|
|
||||||
DProfileLocation loc = new DTimedProfileLocation(12, "foo", MetricFactory.get().createTimedMetric("junk"));
|
DProfileLocation loc = new DTimedProfileLocation(12, "foo", MetricFactory.get().createTimedMetric("junk"));
|
||||||
|
|
||||||
String javaVersion = System.getProperty("java.version");
|
String javaVersion = System.getProperty("java.version");
|
||||||
@@ -18,7 +17,7 @@ class BasicProfileLocationTest {
|
|||||||
assertThat(loc.fullLocation()).endsWith("invoke0(Native Method:12)");
|
assertThat(loc.fullLocation()).endsWith("invoke0(Native Method:12)");
|
||||||
assertThat(loc.location()).isEqualTo("sun.reflect.NativeMethodAccessorImpl.invoke0");
|
assertThat(loc.location()).isEqualTo("sun.reflect.NativeMethodAccessorImpl.invoke0");
|
||||||
assertThat(loc.label()).isEqualTo("NativeMethodAccessorImpl.invoke0");
|
assertThat(loc.label()).isEqualTo("NativeMethodAccessorImpl.invoke0");
|
||||||
} else if (javaVersion.startsWith("18")){
|
} else if (javaVersion.startsWith("18") || javaVersion.startsWith("19")){
|
||||||
assertThat(loc.fullLocation()).endsWith("jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)");
|
assertThat(loc.fullLocation()).endsWith("jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)");
|
||||||
assertThat(loc.location()).isEqualTo("java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke");
|
assertThat(loc.location()).isEqualTo("java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke");
|
||||||
assertThat(loc.label()).isEqualTo("DirectMethodHandleAccessor.invoke");
|
assertThat(loc.label()).isEqualTo("DirectMethodHandleAccessor.invoke");
|
||||||
@@ -31,7 +30,6 @@ class BasicProfileLocationTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void basic_trimPackage() {
|
void basic_trimPackage() {
|
||||||
|
|
||||||
BasicProfileLocation loc = new BasicProfileLocation("com.foo.Bar.all");
|
BasicProfileLocation loc = new BasicProfileLocation("com.foo.Bar.all");
|
||||||
assertThat(loc.obtain()).isFalse();
|
assertThat(loc.obtain()).isFalse();
|
||||||
assertThat(loc.fullLocation()).isEqualTo("com.foo.Bar.all");
|
assertThat(loc.fullLocation()).isEqualTo("com.foo.Bar.all");
|
||||||
@@ -41,7 +39,6 @@ class BasicProfileLocationTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void basic_trimSinglePackage() {
|
void basic_trimSinglePackage() {
|
||||||
|
|
||||||
BasicProfileLocation loc = new BasicProfileLocation("foo.Bar.all");
|
BasicProfileLocation loc = new BasicProfileLocation("foo.Bar.all");
|
||||||
assertThat(loc.obtain()).isFalse();
|
assertThat(loc.obtain()).isFalse();
|
||||||
assertThat(loc.fullLocation()).isEqualTo("foo.Bar.all");
|
assertThat(loc.fullLocation()).isEqualTo("foo.Bar.all");
|
||||||
|
|||||||
Reference in new issue
Block a user