Skip to content

Commit 5cc52b8

Browse files
committed
Add Sybase plugin
1 parent cc07ffb commit 5cc52b8

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

plugin/trino-sybase/pom.xml

+17
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
<artifactId>trino-base-jdbc</artifactId>
3434
</dependency>
3535

36+
<dependency>
37+
<groupId>io.trino</groupId>
38+
<artifactId>trino-plugin-toolkit</artifactId>
39+
</dependency>
40+
3641
<dependency>
3742
<groupId>javax.validation</groupId>
3843
<artifactId>validation-api</artifactId>
@@ -88,6 +93,12 @@
8893
<scope>provided</scope>
8994
</dependency>
9095

96+
<dependency>
97+
<groupId>io.airlift</groupId>
98+
<artifactId>configuration-testing</artifactId>
99+
<scope>test</scope>
100+
</dependency>
101+
91102
<dependency>
92103
<groupId>io.airlift</groupId>
93104
<artifactId>testing</artifactId>
@@ -119,6 +130,12 @@
119130
<scope>test</scope>
120131
</dependency>
121132

133+
<dependency>
134+
<groupId>org.assertj</groupId>
135+
<artifactId>assertj-core</artifactId>
136+
<scope>test</scope>
137+
</dependency>
138+
122139
<dependency>
123140
<groupId>org.testng</groupId>
124141
<artifactId>testng</artifactId>

plugin/trino-sybase/src/test/java/io/trino/plugin/sybase/TestSybaseConfig.java

+11-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
*/
1414
package io.trino.plugin.sybase;
1515

16+
import com.google.common.collect.ImmutableMap;
17+
import org.testng.annotations.Test;
18+
19+
import java.util.Map;
20+
21+
import static io.airlift.configuration.testing.ConfigAssertions.assertFullMapping;
22+
import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults;
23+
import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults;
24+
1625
public class TestSybaseConfig
1726
{
1827
@Test
@@ -29,10 +38,10 @@ public void testExplicitPropertyMappings()
2938
int testVarcharLength = 30000;
3039
String testApiKey = "xyz";
3140

32-
Map<String, String> properties = new ImmutableMap.Builder<String, String>()
41+
Map<String, String> properties = ImmutableMap.<String, String>builder()
3342
.put("sybase.varchar-max-length", String.valueOf(testVarcharLength))
3443
.put("sybase.iam-api-key", testApiKey)
35-
.build();
44+
.buildOrThrow();
3645

3746
SybaseConfig expected = new SybaseConfig()
3847
.setVarcharMaxLength(testVarcharLength)

0 commit comments

Comments
 (0)