Skip to content

Commit

Permalink
ci: make install
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <marc@marcnuri.com>
  • Loading branch information
manusa committed Nov 15, 2024
1 parent d6cbcf2 commit 0f1140a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Build Project
run: ./mvnw ${MAVEN_ARGS} clean install
run: make install MAVEN_ARGS="${MAVEN_ARGS}"

- name: Check java-generator CLI
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javadocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ jobs:
java-version: '11'
distribution: 'temurin'
- name: Check Java Docs
run: make javadoc
run: make javadoc MAVEN_ARGS="${MAVEN_ARGS}"
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ format-java:
.PHONY: format
format: format-license format-java

.PHONY:
.PHONY: quickly
quickly: clean
mvn $(MAVEN_ARGS) install -DskipTests -Djacoco.skip=true

.PHONY: install
install: clean
mvn $(MAVEN_ARGS) install
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class DefaultMockServerWebSocketTest extends Specification {
server.expect().withPath("/websocket")
.andUpgradeToWebSocket()
.open()
.waitFor(10L).andEmit("A text message from the server")
.waitFor(50L).andEmit("A text message from the server")
.done()
.always()
and:
Expand Down Expand Up @@ -98,6 +98,8 @@ class DefaultMockServerWebSocketTest extends Specification {
when: "The request is sent and completed"
conditions.eventually {
assert wsReq.isComplete()
assert wsReq.result() != null
assert wsReq.result().closeReason() != null
}

then: "Expect the onClose reason"
Expand Down Expand Up @@ -140,7 +142,7 @@ class DefaultMockServerWebSocketTest extends Specification {
given: "A WebSocket expectation"
server.expect()
.withPath("/websocket")
.andUpgradeToWebSocket().open().waitFor(10L)
.andUpgradeToWebSocket().open().waitFor(50L)
.andEmit("A text message from the server")
.done().always()
and: "A list to store the received messages"
Expand Down Expand Up @@ -180,7 +182,7 @@ class DefaultMockServerWebSocketTest extends Specification {
given: "A WebSocket expectation"
server.expect()
.withPath("/websocket")
.andUpgradeToWebSocket().open().waitFor(10L).andEmit("done").done().always()
.andUpgradeToWebSocket().open().waitFor(50L).andEmit("done").done().always()
and: "An HTTP client"
def httpClient = vertx.createHttpClient(new HttpClientOptions()
.setProtocolVersion(HttpVersion.HTTP_1_1))
Expand All @@ -207,6 +209,8 @@ class DefaultMockServerWebSocketTest extends Specification {
when: "The request is completed"
conditions.eventually {
assert request.isComplete()
assert request.result() != null
assert request.result().statusCode() > 0
}

then: "Expect the response to contain a matching header"
Expand All @@ -221,7 +225,7 @@ class DefaultMockServerWebSocketTest extends Specification {
given: "A WebSocket expectation"
server.expect()
.withPath("/websocket")
.andUpgradeToWebSocket().open().waitFor(10L).andEmit("done").done().always()
.andUpgradeToWebSocket().open().waitFor(50L).andEmit("done").done().always()
and: "An HTTP client"
def httpClient = vertx.createHttpClient(new HttpClientOptions()
.setProtocolVersion(HttpVersion.HTTP_1_1))
Expand All @@ -243,6 +247,8 @@ class DefaultMockServerWebSocketTest extends Specification {
when: "The request is completed"
conditions.eventually {
assert request.isComplete()
assert request.result() != null
assert request.result().statusCode() > 0
}

then: "Expect the response to have a client error status code"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public void handle(HttpExchange exchange) {

public final void await() {
try {
barrier.await(1, TimeUnit.SECONDS);
barrier.await(5, TimeUnit.SECONDS);
} catch (Exception ex) {
throw new RuntimeException("Failed to await the barrier");
}
Expand Down

0 comments on commit 0f1140a

Please sign in to comment.