You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get a restate.dev project to work in a Quarkus project.
When I try their java-maven-quarkus example with the following unit test:
@QuarkusTest
@RestateTest
public class GreeterTest {
@Inject
@BindService
Greeter greeter;
@Test
void test(@RestateClient Client ingressClient) {
var c = GreeterClient.fromClient(ingressClient);
var response = c.greet(new Greeter.Greeting("John Doe"));
assertEquals("You said hi to John Doe!", response.message());
}
}
Then the test fails because the greeter is null when the restate junit extension tries to fetch it. I have verified in the intellij debugger that quarkus performs the injection first.
Here servicesToBind is null even though a values was injected into the unit test. Do I need to write a Quarkus extension here to get this working or is there some configuration option I can use?
Note that @BindService can only be used on fields, but I suspect a solution could be to let it work on methods as well (if this is a method proxy related issue).
I'm on the latest version of Quarkus (3.28.1) and restate (2.4.0).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I'm trying to get a restate.dev project to work in a Quarkus project.
When I try their java-maven-quarkus example with the following unit test:
Then the test fails because the
greeter
isnull
when the restate junit extension tries to fetch it. I have verified in the intellij debugger that quarkus performs the injection first.The restate extension fetches the field value through the junit support method:
Here
servicesToBind
isnull
even though a values was injected into the unit test. Do I need to write a Quarkus extension here to get this working or is there some configuration option I can use?Note that
@BindService
can only be used on fields, but I suspect a solution could be to let it work on methods as well (if this is a method proxy related issue).I'm on the latest version of Quarkus (3.28.1) and restate (2.4.0).
Beta Was this translation helpful? Give feedback.
All reactions