Skip to content

Add maven test profile as activeByDefault does not work in this scenario #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
env:
JAVA_VERSION: ${{ matrix.java_version }}
run: |
mvn clean package
mvn clean package -Ptest
2 changes: 1 addition & 1 deletion .github/workflows/jdk-ea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ jobs:
- name: Maven version
run: mvn --version
- name: Build with Maven
run: mvn clean verify package
run: mvn clean verify package -Ptest

6 changes: 2 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,15 @@
<module>http-generator-javalin</module>
<module>http-generator-jex</module>
<module>http-generator-client</module>
<module>tests</module>
</modules>

<profiles>
<profile>
<id>central</id>
</profile>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<id>test</id>
<modules>
<module>tests</module>
</modules>
Expand Down
7 changes: 7 additions & 0 deletions tests/test-nima-jsonb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
<version>1.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-http-helidon-generator</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,8 @@ Map<String, Object> strBody2() {
}

@ExceptionHandler
String exception(Exception ex) {

return "";
String exception(IllegalArgumentException ex) {
return "Err: " + ex;
}

@ExceptionHandler
Expand All @@ -105,5 +104,6 @@ void exceptionVoid(ServerResponse res) {
@Filter
void filter(FilterChain chain, RoutingResponse res) {
System.err.println("do nothing lmao");
chain.proceed();
}
}
2 changes: 0 additions & 2 deletions tests/test-nima-jsonb/src/test/java/org/example/TestPair.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ private static HttpRouting.Builder routing() {

var hc = new HelloController();
var hello = new HelloController$Route(hc, beanValidator, jsonb);

routing.addFeature(hello);
hello.setup(routing);

var cr = new ThreadLocalRequestContextResolver();
var tc = new TestController();
Expand Down