I'm trying to test a part of my code that does a database transaction.
@QuarkusTest
class FileServiceTest {
@InjectSpy
MyService myService;
@Test
void testDatabaseOperation() {
myService.doSomeDatabaseOperation()
.invoke(i -> Assertions.assertEquals(0, i.size()))
.subscribe().withSubscriber(UniAssertSubscriber.create())
.assertCompleted();
}
But I'm getting this exception when trying to call .find() of my repository
java.lang.IllegalStateException: No current Vertx context found
Why is there no session created automatically and how would I tell Quarkus to do so?