-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#10: Automatted dialect list detection
- Loading branch information
1 parent
3bef8ec
commit 80d409e
Showing
16 changed files
with
96 additions
and
121 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,27 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
<launchConfiguration type="org.eclipse.jdt.junit.launchconfig"> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/virtual-schema-common-jdbc"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="4"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> | ||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/> | ||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.eclemma.core.SCOPE_IDS"> | ||
<listEntry value="=virtual-schema-common-jdbc/src\/main\/java"/> | ||
</listAttribute> | ||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=virtual-schema-common-jdbc"/> | ||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> | ||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit5"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="virtual-schema-common-jdbc"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Djava.util.logging.config.file=src/test/resources/logging.properties"/> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
<listEntry value="/virtual-schema-common-jdbc"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
<listEntry value="4"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> | ||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/> | ||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/> | ||
</listAttribute> | ||
<listAttribute key="org.eclipse.eclemma.core.SCOPE_IDS"> | ||
<listEntry value="=virtual-schema-common-jdbc/src\/main\/java"/> | ||
</listAttribute> | ||
<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=virtual-schema-common-jdbc"/> | ||
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/> | ||
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/> | ||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit5"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_CLASSPATH_ONLY_JAR" value="false"/> | ||
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/> | ||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="virtual-schema-common-jdbc"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/> | ||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Djava.util.logging.config.file=src/test/resources/logging.properties"/> | ||
</launchConfiguration> |
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
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
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
1 change: 1 addition & 0 deletions
1
src/main/resources/META-INF/services/com.exasol.adapter.AdapterFactory
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 @@ | ||
com.exasol.adapter.jdbc.JdbcAdapterFactory |
1 change: 0 additions & 1 deletion
1
src/main/resources/META-INF/services/com.exasol.adapter.dialects.SqlDialectFactory
This file was deleted.
Oops, something went wrong.
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
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
50 changes: 0 additions & 50 deletions
50
src/test/java/com/exasol/adapter/dialects/DialectTestData.java
This file was deleted.
Oops, something went wrong.
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
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
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
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
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,38 @@ | ||
package com.exasol.adapter.jdbc; | ||
|
||
import static com.exasol.adapter.AdapterProperties.*; | ||
import static org.hamcrest.Matchers.hasItem; | ||
import static org.hamcrest.Matchers.instanceOf; | ||
import static org.junit.Assert.assertThat; | ||
|
||
import java.util.List; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.mockito.Mockito; | ||
|
||
import com.exasol.ExaMetadata; | ||
import com.exasol.adapter.*; | ||
|
||
class JdbcAdapterIT { | ||
@Test | ||
public void testRegisteredDialects() throws AdapterException { | ||
final String rawRequest = "{\n" // | ||
+ " \"type\" : \"getCapabilities\",\n" // | ||
+ " \"schemaMetadataInfo\" :\n" // | ||
+ " {\n" // | ||
+ " \"name\" : \"foo\",\n" // | ||
+ " \"properties\" :\n" // | ||
+ " {\n" // | ||
+ " \"" + SQL_DIALECT_PROPERTY + "\" : \"DERBY\"\n," // | ||
+ " \"" + CONNECTION_STRING_PROPERTY + "\" : \"jdbc:derby:memory:test;create=true;\"\n," // | ||
+ " \"" + USERNAME_PROPERTY + "\" : \"\"\n," // | ||
+ " \"" + PASSWORD_PROPERTY + "\" : \"\"\n" // | ||
+ " }\n" // | ||
+ " }\n" // | ||
+ "}"; | ||
final ExaMetadata exaMetadata = Mockito.mock(ExaMetadata.class); | ||
RequestDispatcher.adapterCall(exaMetadata, rawRequest); | ||
final List<AdapterFactory> registeredFactories = AdapterRegistry.getInstance().getRegisteredAdapterFactories(); | ||
assertThat(registeredFactories, hasItem(instanceOf(JdbcAdapterFactory.class))); | ||
} | ||
} |
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
2 changes: 2 additions & 0 deletions
2
src/test/resources/META-INF/services/com.exasol.adapter.dialects.SqlDialectFactory
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,2 @@ | ||
com.exasol.adapter.dialects.derby.DerbySqlDialectFactory | ||
com.exasol.adapter.dialects.dummy.DummySqlDialectFactory |