-
Notifications
You must be signed in to change notification settings - Fork 23
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
Deadline exceed exception when getting projection list #287
Comments
It's hard to read the code the way it's been formatted. Is there a repository we can look at to see the code? |
Hi @w1am , Looking forward to reading your thoughts about the issue I presented. Thank you. |
This might be caused by lingering connections from the previous container. I would make sure to close the client before stopping the container. Perhaps something like this:
We do the same in our tests. See ClientTracker.java |
Hi William,
thank you for your suggestion. Unfortunately, the issue persists even after
adding the call to the shutdown() method as you suggested.
Since the issue persists and I didn't find any other
information/suggestion, I'm going to drop EventStoreDB as event store
database and I'll migrate to PostgreSQL.
Thank you for the help.
Best regards,
Federico
Il giorno lun 7 ott 2024 alle ore 08:58 William Chong <
***@***.***> ha scritto:
… This might be caused by lingering connections from the previous container.
I would make sure to close the client before stopping the container.
Perhaps something like this:
@AfterEach
public void afterEach() {
if (projectionClient != null) {
projectionClient.shutdown();
}
if (eventStoreDbClient != null) {
eventStoreDbClient.shutdown();
}
eventStoreDbContainer.stop();
}
—
Reply to this email directly, view it on GitHub
<#287 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACMSCQEFIZMWRNJWRERMBG3Z2IWJZAVCNFSM6AAAAABPDZOJ32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJWGA3DONJVHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
GrpcClient expects Exceptions of a specific type but as it is right now it will not handle any exceptions as they are propagated as CompletionException This will not solve any similar issues for any other class using ClientTelemetry, and a better solution would probably be to never wrap the exception, however that would require more intrusive changes to the future chain. Fixes EventStore#287
Hi here,
not sure if this is the right place to raise my question. Anyway, I'm using TestContainers to spin Docker containers to run integration tests using EvenStore database.
Every integration test scenario spins a new container.
This is the test class that contains the tests:
This class inherits from this one:
And this is the ProjectionRepository class that implements the EnsureProjectExists() method:
When executing the Gradle build, the first call to the method projectionRepository.EnsureProjectionExists() works, it returns the list of the projections and the test pass, but when Gradle executes the other test case and it executed the second time the projectionRepository.EnsureProjectionExists() then the execution stucks and I after the timeout the test fails with the error:
java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 29.999275400s. Name resolution delay 0.000000000 seconds. [closed=[], open=[[remote_addr=localhost/127.0.0.1:63215]]] at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396) at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073) at com.federico.LessonBookingSystem.adapters.out.persistence.EventStoreLessonProjectionsRepository.ProjectionExists(EventStoreLessonProjectionsRepository.java:61) at com.federico.LessonBookingSystem.adapters.out.persistence.EventStoreLessonProjectionsRepository.EnsureProjectionExists(EventStoreLessonProjectionsRepository.java:31) at integration.EventStoreLessonProjectionsRepositoryTests.GetLessonOverviewUseCase_createOneLesson_eventModellingScenario3(EventStoreLessonProjectionsRepositoryTests.java:124)
For a reason that I'm not getting, the second call to the projectionClient.list().get() (see ProjectionExists() method in the class EventStoreLessonProjectionsRepository) stucks.
I checked the logs and I can confirm that this is the line of code where the execution stops until the timeout.
Any suggestion?
Thank you.
The text was updated successfully, but these errors were encountered: