Change VALID_URL_PREFIX to use sqlite instead

This commit is contained in:
김선우
2025-01-14 17:19:33 +09:00
parent 945a91dee5
commit 04cd655574
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ import java.util.Properties;
import java.util.logging.Logger;
public class JDBC implements Driver {
private static final String VALID_URL_PREFIX = "jdbc:limbo:";
private static final String VALID_URL_PREFIX = "jdbc:sqlite:";
static {
try {

View File

@@ -20,13 +20,13 @@ class JDBCTest {
@Test
void non_null_connection_is_returned_when_valid_url_is_passed() throws Exception {
String fileUrl = TestUtils.createTempFile();
LimboConnection connection = JDBC.createConnection("jdbc:limbo:" + fileUrl, new Properties());
LimboConnection connection = JDBC.createConnection("jdbc:sqlite:" + fileUrl, new Properties());
assertThat(connection).isNotNull();
}
@Test
void connection_can_be_retrieved_from_DriverManager() throws SQLException {
try (Connection connection = DriverManager.getConnection("jdbc:limbo:sample.db")) {
try (Connection connection = DriverManager.getConnection("jdbc:sqlite:sample.db")) {
assertThat(connection).isNotNull();
}
}