Skip to content

Commit bdbaf20

Browse files
authored
[OJDBC-EXTENSION] IF CONSUMERGROUP PARAMETER IS PROVIDED FOR "DATABASE CONNECTION STRING PROVIDER" IT FAILS WITH "NO PARAMETER NAMED: CONSUMERGROUP" Renamed parameter to match documentation (#157)
Renamed parameter to match documentation
1 parent a0fa0c8 commit bdbaf20

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

ojdbc-provider-oci/src/main/java/oracle/jdbc/provider/oci/resource/DatabaseConnectionStringProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public final class DatabaseConnectionStringProvider
6767
private static final ResourceParameter[] PARAMETERS =
6868
new ResourceParameter[] {
6969
new ResourceParameter("ocid", WalletFactory.OCID),
70-
new ResourceParameter("consumer-group", CONSUMER_GROUP, "MEDIUM")
70+
new ResourceParameter("consumerGroup", CONSUMER_GROUP, "MEDIUM")
7171
};
7272

7373
/**

ojdbc-provider-oci/src/test/java/oracle/jdbc/provider/oci/resource/DatabaseConnectionStringProviderTest.java

+18
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,22 @@ public void test() {
7676
String descriptor = PROVIDER.getConnectionString(parameterValues);
7777
assertNotNull(descriptor);
7878
}
79+
80+
@Test
81+
public void testWithConsumerGroup() {
82+
Map<String, CharSequence> testParameters = new HashMap<>();
83+
testParameters.put("authenticationMethod", "config-file");
84+
testParameters.put("configFile", TestProperties.getOrAbort(
85+
OciTestProperty.OCI_CONFIG_FILE));
86+
testParameters.put("profile", TestProperties.getOrAbort(
87+
OciTestProperty.OCI_CONFIG_PROFILE));
88+
testParameters.put("ocid", TestProperties.getOrAbort(
89+
OciTestProperty.OCI_DATABASE_OCID));
90+
testParameters.put("consumerGroup", "HIGH");
91+
92+
Map<Parameter, CharSequence> parameterValues =
93+
createParameterValues(PROVIDER, testParameters);
94+
String descriptor = PROVIDER.getConnectionString(parameterValues);
95+
assertNotNull(descriptor);
96+
}
7997
}

0 commit comments

Comments
 (0)