Skip to content

Commit 4591e5b

Browse files
committed
Add unit tests on windows
1 parent b958fd2 commit 4591e5b

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

.github/actions/common/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ inputs:
5454
runs:
5555
using: "composite"
5656
steps:
57-
- if: ${{ inputs.free-space == 'true' }}
57+
- if: ${{ inputs.free-space == 'true' && runner.os != 'Windows'}}
5858
# See https://github.com/actions/runner-images/issues/2840
5959
name: Free disk space
6060
shell: bash

.github/workflows/validate.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,13 @@ jobs:
102102
timeout-minutes: 30
103103
strategy:
104104
matrix:
105-
os: [ ubuntu-20.04 ]
105+
os: [ ubuntu-20.04, windows-2022 ]
106106
moduleSet: [ core, it, dbclient, dbclient-oracle, others ]
107107
include:
108108
- { os: ubuntu-20.04, platform: linux }
109+
- { os: windows-2022, platform: windows }
109110
runs-on: ${{ matrix.os }}
110-
name: tests/${{ matrix.moduleSet }}
111+
name: tests/${{ matrix.moduleSet }}-${{matrix.platform}}
111112
steps:
112113
- uses: actions/checkout@v4
113114
with:
@@ -319,6 +320,7 @@ jobs:
319320
include:
320321
- { os: ubuntu-20.04, platform: linux }
321322
- { os: macos-14, platform: macos }
323+
# - { os: windows-2022, platform: windows }
322324
runs-on: ${{ matrix.os }}
323325
name: tests/packaging-${{ matrix.packaging }}-${{ matrix.platform }}
324326
steps:

builder/tests/builder/src/test/java/io/helidon/builder/test/CustomNamedTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ void testIt() throws Exception {
5656
.build();
5757
DefaultPrettyPrinter printer = new DefaultPrettyPrinter();
5858
String json = mapper.writer(printer).writeValueAsString(customNamed);
59-
assertThat(json, equalTo("{\n" + " \"stringSet\" : [ \"b\", \"a\", \"y\" ]\n" + "}"));
59+
assertThat(json, equalTo("{"
60+
+ System.lineSeparator()
61+
+ " \"stringSet\" : [ \"b\", \"a\", \"y\" ]"
62+
+ System.lineSeparator()
63+
+ "}"));
6064
}
6165

6266
}

webclient/tests/grpc/src/test/java/io/helidon/webclient/grpc/tests/GrpcClientUriTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
import io.helidon.webserver.testing.junit5.ServerTest;
3030

3131
import org.junit.jupiter.api.Test;
32+
import org.junit.jupiter.api.condition.DisabledOnOs;
33+
import org.junit.jupiter.api.condition.OS;
3234

3335
import static org.hamcrest.CoreMatchers.is;
3436
import static org.hamcrest.MatcherAssert.assertThat;
@@ -77,6 +79,7 @@ void testSupplier() {
7779
* Should fail to connect to first URI but succeed with second after retrying.
7880
*/
7981
@Test
82+
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "Windows runner is too slow")
8083
void testSupplierWithRetries() {
8184
CountDownLatch latch = new CountDownLatch(2);
8285
ClientUri badUri = ClientUri.create(URI.create("https://foo:8000"));

0 commit comments

Comments
 (0)