Skip to content

Commit 5f34ff7

Browse files
committed
Tests
1 parent d24c1ec commit 5f34ff7

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/junit.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
uses: mirromutth/mysql-action@v1.1
2020
with:
2121
mysql database: 'test'
22-
mysql root password: 'test'
22+
mysql user: 'test'
23+
mysql password: 'test'
2324
mysql port: 3306
2425
- name: Gradle Build
2526
run: ./gradlew build -x test

shared/src/main/java/me/zort/sqllib/util/Util.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static int count(String str, String substr) {
1414
int count = 0;
1515

1616
while (copy.contains(substr)) {
17-
copy = copy.replaceFirst(str, substr);
17+
copy = copy.replaceFirst(substr, "");
1818
count++;
1919
}
2020

src/test/java/me/zort/sqllib/test/TestCase1.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import static org.junit.jupiter.api.Assertions.*;
1717

1818
@Log4j2
19-
@EnabledOnOs(OS.LINUX) // TODO: Fix tests, endless run
19+
@EnabledOnOs(value = {OS.LINUX, OS.WINDOWS}) // TODO: Fix tests, endless run
2020
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
2121
public class TestCase1 {
2222

@@ -42,7 +42,7 @@ public void prepare() {
4242
SQLDatabaseOptions options = new SQLDatabaseOptions();
4343
options.setDebug(true);
4444

45-
DefaultSQLEndpoint endpoint = new DefaultSQLEndpoint(String.format("%s:3306", host), "test", "root", "test");
45+
DefaultSQLEndpoint endpoint = new DefaultSQLEndpoint(String.format("%s:3306", host), "test", "test", "test");
4646

4747
connection = SQLConnectionBuilder.of(endpoint)
4848
.withDriver("com.mysql.cj.jdbc.Driver")

0 commit comments

Comments
 (0)