File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
core/src/main/java/org/apache/calcite/avatica/remote
server/src/test/java/org/apache/calcite/avatica Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -329,6 +329,20 @@ allprojects {
329329 exceptionFormat = TestExceptionFormat .FULL
330330 showStandardStreams = true
331331 }
332+ // Pass the property to tests
333+ fun passProperty (name : String , default : String? = null) {
334+ val value = System .getProperty(name) ? : default
335+ value?.let { systemProperty(name, it) }
336+ }
337+ passProperty(" java.awt.headless" )
338+ passProperty(" user.language" , " TR" )
339+ passProperty(" user.country" , " tr" )
340+ val props = System .getProperties()
341+ for (e in props.propertyNames() as `java.util`.Enumeration <String >) {
342+ if (e.startsWith(" calcite." ) || e.startsWith(" avatica." )) {
343+ passProperty(e)
344+ }
345+ }
332346 }
333347 withType<SpotBugsTask >().configureEach {
334348 group = LifecycleBasePlugin .VERIFICATION_GROUP
Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ public class AvaticaCommonsHttpClientSpnegoImpl extends AvaticaCommonsHttpClient
5555 public static final String CACHED_CONNECTIONS_MAX_PER_ROUTE_KEY =
5656 "avatica.http.spnego.max_per_route" ;
5757
58- private static final boolean USE_CANONICAL_HOSTNAME = true ;
58+ private static final boolean USE_CANONICAL_HOSTNAME =
59+ Boolean .parseBoolean (
60+ System .getProperty ("avatica.http.spnego.use_canonical_hostname" , "true" ));
5961 private static final boolean STRIP_PORT_ON_SERVER_LOOKUP = true ;
6062
6163 /**
Original file line number Diff line number Diff line change @@ -70,6 +70,9 @@ private static void setupKdc() throws Exception {
7070 if (isKdcStarted ) {
7171 return ;
7272 }
73+ if (System .getProperty ("avatica.http.spnego.use_canonical_hostname" ) == null ) {
74+ System .setProperty ("avatica.http.spnego.use_canonical_hostname" , "false" );
75+ }
7376 kdc = new SimpleKdcServer ();
7477 File target = SpnegoTestUtil .TARGET_DIR ;
7578 assertTrue (target .exists ());
You can’t perform that action at this time.
0 commit comments