Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Commit b8adcf7

Browse files
author
Tue Ton
committed
more fix to the failing unit tests in Linux
1 parent 4141dbb commit b8adcf7

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

.github/workflows/ci-build.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ jobs:
4646
- name: Build all artefacts
4747
run: ./gradlew --no-daemon buildAll
4848

49-
- name: Run unit tests
50-
run: ./gradlew --no-daemon test
49+
- name: Run unit tests, excluding the Ldap*Test classes
50+
run: ./gradlew --no-daemon test -PexcludeTests=**/Ldap*Test.class
51+
52+
- name: Run only the Ldap*Test unit tests
53+
run: ./gradlew --no-daemon test --tests *Ldap*Test
5154

5255
build_windows:
5356
name: Build and test in Windows environment
@@ -83,5 +86,9 @@ jobs:
8386
- name: Build all artefacts
8487
run: .\gradlew.bat --no-daemon buildAll
8588

86-
- name: Run unit tests
87-
run: .\gradlew.bat --no-daemon test
89+
- name: Run unit tests, excluding the LdapPublicKeyManagerTest class
90+
run: .\gradlew.bat --no-daemon test -PexcludeTests=**/LdapPublicKeyManagerTest.class
91+
92+
- name: Run only the LdapPublicKeyManagerTest unit test class
93+
run: .\gradlew.bat --no-daemon test --tests *LdapPublicKeyManagerTest
94+

build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ sourceSets {
106106
}
107107
}
108108

109+
test {
110+
//Dynamic exclude some unit tests through property defined in the command line
111+
if (project.hasProperty('excludeTests')) {
112+
exclude project.property('excludeTests')
113+
}
114+
}
115+
109116
task copyToRunDir(type: Copy) {
110117
description = "Copy main classes and resources to the 'run' directory"
111118
group = 'Run'

src/test/java/com/gitblit/tests/LdapPublicKeyManagerTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
import org.apache.sshd.common.util.SecurityUtils;
3232
import org.junit.BeforeClass;
33-
import org.junit.Ignore;
3433
import org.junit.Test;
3534
import org.junit.runner.RunWith;
3635
import org.junit.runners.Parameterized;
@@ -50,7 +49,7 @@
5049
* @author Florian Zschocke
5150
*
5251
*/
53-
@Ignore("inconsistent; would pass when run stand-alone, but fail when run as part of the whole 'unit test' suite")
52+
//@Ignore("inconsistent; would pass when run stand-alone, but fail when run as part of the whole 'unit test' suite")
5453
@RunWith(Parameterized.class)
5554
public class LdapPublicKeyManagerTest extends LdapBasedUnitTest {
5655

0 commit comments

Comments
 (0)