Skip to content

Commit 2721942

Browse files
committed
Update PinotConfig tests to handle new broker-url and proxy validation constraint
1 parent e112180 commit 2721942

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

plugin/trino-pinot/src/test/java/io/trino/plugin/pinot/TestPinotConfig.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void testExplicitPropertyMappings()
6868
.put("pinot.max-rows-for-broker-queries", "5000")
6969
.put("pinot.aggregation-pushdown.enabled", "false")
7070
.put("pinot.count-distinct-pushdown.enabled", "false")
71-
.put("pinot.proxy.enabled", "true")
71+
.put("pinot.proxy.enabled", "false")
7272
.put("pinot.target-segment-page-size", "2MB")
7373
.buildOrThrow();
7474

@@ -85,7 +85,7 @@ public void testExplicitPropertyMappings()
8585
.setMaxRowsForBrokerQueries(5000)
8686
.setAggregationPushdownEnabled(false)
8787
.setCountDistinctPushdownEnabled(false)
88-
.setProxyEnabled(true)
88+
.setProxyEnabled(false)
8989
.setTargetSegmentPageSize(DataSize.of(2, MEGABYTE));
9090

9191
ConfigAssertions.assertFullMapping(properties, expected);
@@ -103,6 +103,18 @@ public void testInvalidCountDistinctPushdown()
103103
AssertTrue.class);
104104
}
105105

106+
@Test
107+
public void testInvalidBrokerProxyConfiguration()
108+
{
109+
assertFailsValidation(
110+
new PinotConfig()
111+
.setBrokerUrl(HostAndPort.fromString("host1:1111"))
112+
.setProxyEnabled(true),
113+
"validBrokerProxyConfiguration",
114+
"Invalid configuration: pinot.broker-url and pinot.proxy.enabled cannot both be set.",
115+
AssertTrue.class);
116+
}
117+
106118
@Test
107119
public void testControllerUrls()
108120
{

0 commit comments

Comments
 (0)