Also add the time zone workaround for Oracle JPA suite
package com.querydsl.jpa.suites;
+import java.util.TimeZone;
+
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;
@@ -17,10 +20,23 @@ public class OracleSuiteTest extends AbstractSuite {
public static class Hibernate extends HibernateBase { }
public static class HibernateSQL extends HibernateSQLBase { }
+ private static TimeZone defaultZone;
+
@BeforeClass
public static void setUp() throws Exception {
Mode.mode.set("oracle");
Mode.target.set(Target.ORACLE);
+
+ // change time zone to work around ORA-01882
+ // see https://gist.github.com/jarek-przygodzki/cbea3cedae3aef2bbbe0ff6b057e8321
+ // the test may work fine on your machine without this, but it fails when the GitHub runner executes it
+ defaultZone = TimeZone.getDefault();
+ TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
+ }
+
+ @AfterClass
+ public static void tearDown() {
+ TimeZone.setDefault(defaultZone);
}
}
