Skip to content

Hibernate Validator integration test #1919

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 1 commit into from
May 23, 2024
Merged

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented May 23, 2024

Fix #1907

Comment on lines +206 to +220
testOnContext.vertx()
.executeBlocking(
// schema generation is a blocking operation and so it causes an
// exception when run on the Vert.x event loop. So call it using
// Vertx.executeBlocking()
promise -> startFactoryManager( promise, confSupplier ),
event -> {
if ( event.succeeded() ) {
future.complete( null );
}
else {
future.completeExceptionally( event.cause() );
}
}
);

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note test

Invoking
Vertx.executeBlocking
should be avoided because it has been deprecated.
return 0L;
}
else {
return Long.parseLong( s.replaceAll( "-", "" ) );

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException Note

Potential uncaught 'java.lang.NumberFormatException'.
* @return a {@link Uni} with the expected exception thrown by the uni we were testing.
*/
public static <U extends Throwable> Uni<U> assertThrown(Class<U> expectedException, Uni<?> uni) {
return uni.onItemOrFailure().transform( (s, e) -> {

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 's' is never used.
}

public static void test(VertxTestContext context, CompletionStage<?> work) {
work.whenComplete( (res, err) -> {

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'res' is never used.
}

public static void test(VertxTestContext context, Uni<?> uni) {
uni.subscribe().with( res -> context.completeNow(), context::failNow );

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'res' is never used.
protected void addServices(StandardServiceRegistryBuilder builder) {
}

protected void configureServices(StandardServiceRegistry registry) {

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'registry' is never used.
return configuration.buildSessionFactory( registry );
}

protected void addServices(StandardServiceRegistryBuilder builder) {

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'builder' is never used.
@DavideD DavideD merged commit 7e318e4 into hibernate:main May 23, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test integration between Hibernate Reactive and Validator
1 participant