Skip to content

Commit 734ba83

Browse files
shreyas-devshreyas-dview
authored andcommitted
Update PinotConfig tests to handle new broker-url and proxy validation constraint
1 parent e112180 commit 734ba83

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ 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")
7271
.put("pinot.target-segment-page-size", "2MB")
7372
.buildOrThrow();
7473

@@ -85,7 +84,6 @@ public void testExplicitPropertyMappings()
8584
.setMaxRowsForBrokerQueries(5000)
8685
.setAggregationPushdownEnabled(false)
8786
.setCountDistinctPushdownEnabled(false)
88-
.setProxyEnabled(true)
8987
.setTargetSegmentPageSize(DataSize.of(2, MEGABYTE));
9088

9189
ConfigAssertions.assertFullMapping(properties, expected);
@@ -103,6 +101,18 @@ public void testInvalidCountDistinctPushdown()
103101
AssertTrue.class);
104102
}
105103

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

0 commit comments

Comments
 (0)