-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/4931-Support-for-GraphDB-knowledge-b…
…ases * main: No issue: Minor cleaning [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release inception-34.0-beta-1 #4935 - Incorrect repetitions of sentences [maven-release-plugin] prepare for next development iteration [maven-release-plugin] prepare release inception-33.2 #4936 - Option to export project via remote API without any secondary format #4933 - Exporting project fails if a curation CAS is missing or document state is wrong No issue: Do not fail-fast No issue: Try caching the Maven repo #4916 - Support for MS SQL Server No issue: Formatting No issue: Small style fix No issue: Minor correction in format documentation #4916 - Support for MS SQL Server
- Loading branch information
Showing
28 changed files
with
502 additions
and
143 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
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
82 changes: 82 additions & 0 deletions
82
...pp/src/test/java/de/tudarmstadt/ukp/inception/db/InceptionMSSQLServerIntegrationTest.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,82 @@ | ||
/* | ||
* Licensed to the Technische Universität Darmstadt under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The Technische Universität Darmstadt | ||
* licenses this file to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package de.tudarmstadt.ukp.inception.db; | ||
|
||
import java.nio.file.Path; | ||
|
||
import org.junit.jupiter.api.AfterAll; | ||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Nested; | ||
import org.junit.jupiter.api.io.TempDir; | ||
import org.springframework.context.ConfigurableApplicationContext; | ||
import org.springframework.test.context.DynamicPropertyRegistry; | ||
import org.springframework.test.context.DynamicPropertySource; | ||
import org.testcontainers.containers.MSSQLServerContainer; | ||
import org.testcontainers.junit.jupiter.Testcontainers; | ||
|
||
@Testcontainers(disabledWithoutDocker = true) | ||
class InceptionMSSQLServerIntegrationTest | ||
{ | ||
@SuppressWarnings("resource") | ||
static final MSSQLServerContainer<?> dbContainer = new MSSQLServerContainer<>( | ||
"mcr.microsoft.com/mssql/server:2022-latest") // | ||
.acceptLicense(); | ||
|
||
static @TempDir Path tempDir; | ||
|
||
static ConfigurableApplicationContext appContext; | ||
|
||
@BeforeAll | ||
static void setupClass() | ||
{ | ||
dbContainer.start(); | ||
} | ||
|
||
@AfterAll | ||
static void tearDownClass() | ||
{ | ||
if (appContext != null) { | ||
appContext.close(); | ||
} | ||
|
||
if (dbContainer != null && dbContainer.isRunning()) { | ||
dbContainer.stop(); | ||
} | ||
} | ||
|
||
@Nested | ||
class SpringApplcationContext | ||
extends InceptionIntegrationTest_ImplBase | ||
{ | ||
@DynamicPropertySource | ||
static void configureProperties(DynamicPropertyRegistry registry) | ||
{ | ||
registry.add("database.url", dbContainer::getJdbcUrl); | ||
registry.add("database.username", dbContainer::getUsername); | ||
registry.add("database.password", dbContainer::getPassword); | ||
registry.add("inception.home", () -> tempDir.toString()); | ||
} | ||
|
||
@BeforeEach | ||
void setup(ConfigurableApplicationContext aAppContext) | ||
{ | ||
appContext = aAppContext; | ||
} | ||
} | ||
} |
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
Oops, something went wrong.