Skip to content

Commit 1135eb6

Browse files
Copilotkwin
andcommitted
Fix Windows timeout issue by disabling mock helper tests on Windows
Co-authored-by: kwin <185025+kwin@users.noreply.github.com>
1 parent de4d7e5 commit 1135eb6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/java/org/codehaus/plexus/components/secdispatcher/internal/sources/GitCredentialHelperMasterSourceTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
import org.codehaus.plexus.components.secdispatcher.SecDispatcherException;
2929
import org.junit.jupiter.api.BeforeAll;
3030
import org.junit.jupiter.api.Test;
31+
import org.junit.jupiter.api.condition.DisabledOnOs;
32+
import org.junit.jupiter.api.condition.OS;
3133
import org.junit.jupiter.api.io.TempDir;
3234

3335
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -133,6 +135,9 @@ void testHandleThrowsExceptionForInvalidUrlParameter() {
133135
}
134136

135137
@Test
138+
@DisabledOnOs(
139+
value = OS.WINDOWS,
140+
disabledReason = "Windows batch files don't handle closed stdin gracefully in validation tests")
136141
void testHandleWithMockHelper() throws SecDispatcherException {
137142
GitCredentialHelperMasterSource source = new GitCredentialHelperMasterSource();
138143

@@ -175,6 +180,9 @@ void testValidateConfigurationWithNonMatchingPrefix() {
175180
}
176181

177182
@Test
183+
@DisabledOnOs(
184+
value = OS.WINDOWS,
185+
disabledReason = "Windows batch files don't handle closed stdin gracefully in validation tests")
178186
void testValidateConfigurationWithMockHelper() {
179187
GitCredentialHelperMasterSource source = new GitCredentialHelperMasterSource();
180188

0 commit comments

Comments
 (0)