1414package com .facebook .presto .druid ;
1515
1616import com .facebook .airlift .configuration .testing .ConfigAssertions ;
17+ import com .google .common .collect .ImmutableList ;
1718import com .google .common .collect .ImmutableMap ;
1819import org .testng .annotations .Test ;
1920
@@ -28,10 +29,11 @@ public class TestDruidConfig
2829 public void testDefaults ()
2930 {
3031 assertRecordedDefaults (recordDefaults (DruidConfig .class )
31- .setDruidBrokerUrl (null )
32- .setDruidCoordinatorUrl (null )
33- .setDruidSchema ("druid" )
34- .setComputePushdownEnabled (false ));
32+ .setDruidBrokerUrl (null )
33+ .setDruidCoordinatorUrl (null )
34+ .setDruidSchema ("druid" )
35+ .setComputePushdownEnabled (false )
36+ .setHadoopResourceConfigFiles ((String ) null ));
3537 }
3638
3739 @ Test
@@ -42,13 +44,15 @@ public void testExplicitPropertyMappings()
4244 .put ("druid.coordinator-url" , "http://druid.coordinator:4321" )
4345 .put ("druid.schema-name" , "test" )
4446 .put ("druid.compute-pushdown-enabled" , "true" )
47+ .put ("druid.hadoop.config.resources" , "/etc/core-site.xml,/etc/hdfs-site.xml" )
4548 .build ();
4649
4750 DruidConfig expected = new DruidConfig ()
4851 .setDruidBrokerUrl ("http://druid.broker:1234" )
4952 .setDruidCoordinatorUrl ("http://druid.coordinator:4321" )
5053 .setDruidSchema ("test" )
51- .setComputePushdownEnabled (true );
54+ .setComputePushdownEnabled (true )
55+ .setHadoopResourceConfigFiles (ImmutableList .of ("/etc/core-site.xml" , "/etc/hdfs-site.xml" ));
5256
5357 ConfigAssertions .assertFullMapping (properties , expected );
5458 }
0 commit comments