-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIR-26385 send additional parameters to real engine only
- Loading branch information
1 parent
b194b2b
commit 8c293a5
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/integrationTest/java/integration/tests/ConnectionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package integration.tests; | ||
|
||
import integration.ConnectionInfo; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.TestInstance; | ||
|
||
import java.sql.Connection; | ||
import java.sql.DriverManager; | ||
import java.sql.SQLException; | ||
|
||
import static java.lang.String.format; | ||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
@TestInstance(TestInstance.Lifecycle.PER_CLASS) | ||
public class ConnectionTest { | ||
/** | ||
* This test connects to specific engine with additional property {@code use_standard_sql} supported by user engine but | ||
* not supported by system engine used here to retrieve the data of user engine. | ||
* The test is needed because there were create connection to system engine by copying all given connection properties | ||
* while additional (custom) parameters should be ignored. | ||
* @throws SQLException if something went wrong | ||
*/ | ||
@Test | ||
void connectionWithAdditionalProperties() throws SQLException { | ||
ConnectionInfo params = integration.ConnectionInfo.getInstance(); | ||
String url = format("jdbc:firebolt:%s?env=%s&engine=%s&account=%s&use_standard_sql=1", params.getDatabase(), params.getEnv(), params.getEngine(), params.getAccount()); | ||
try(Connection connection = DriverManager.getConnection(url, params.getPrincipal(), params.getSecret())) { | ||
assertNotNull(connection); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters