Closed dpasek-senacor closed 3 years ago
@YoEight I will try. I currently have some issues running the integrations tests locally with the test container. It does not fetch/start the Docker images. I didn't have time to look into it.
@dpasek-senacor Yeah you have to pull the image first.
Hi @YoEight I have added a test case for the subscribe to persistent subscription use case. I failed at applying the same test case for non-persistent subscriptions as I could not invoke an error on subscribe: you can currently subscribe to unknown streams etc. Is there a way to (easily) invoke an error on subscribing for non-persistent subscriptions?
@dpasek-senacor The best you can do in this case is to shutdown the database.
@YoEight
The best you can do in this case is to shutdown the database.
Thanks! Works like a charm... :-)
Looks good @dpasek-senacor, thanks for your contribution 👍 Would you mind rebasing and squash everything into a single commit?
@pvanbuijtene Sorry, but I have problems squashing/rebasing as I did a merge from trunk (to resolve conflicts) and now squashing on my side is no longer possible. Any options to avoid squashing on my side?
Should it possible for you to merge by squashing? See: https://docs.github.com/en/github/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request#merging-a-pull-request
Sorry for being new to this "contribution game" and the github worklflows. 😄
No worries, I'll see how I can help to get your changes merged.
@dpasek-senacor I collected some instructions on how to update this pull request to a single commit, we do this for keeping a clean commit history. I hope they help, you can add me pvanbuijtene
as a contributor to your repository if you want me to do it.
Setup remotes:
Before starting it's good to understand how my remotes
are setup, I use origin
for my own repository and upstream
for the EventStore repository. This is how it looks like:
$ git remote -v
origin git@github.com:pvanbuijtene/EventStoreDB-Client-Java.git (fetch)
origin git@github.com:pvanbuijtene/EventStoreDB-Client-Java.git (push)
upstream git@github.com:EventStore/EventStoreDB-Client-Java.git (fetch)
upstream git@github.com:EventStore/EventStoreDB-Client-Java.git (push)
You can use any name you want, but below I will refer to origin
and upstream
.
Remove merge commit and squash:
4
commits on the branch: git rebase --interactive head~4
Pick
the first commit (767d1d2edca51576b3fc9fb161f7c08bd011e8dd) and fixup
the 2nd (c896d4292654fd692d5afd3ff37178cb9bd03ede) & 3rd (b590d43e3536b5f39a55362645d832ac960e58fe) commits.Drop
all non-relevant commits.
pick 767d1d2 Improve handling...
fixup c896d42 Add test case...
fixup b590d43 Simplify tests...
drop e7a4a6d Add type information...
drop 490e30f Add equals() and...
drop 56fa60a Add equals() hashCode()...
drop ba7f421 Avoid calling...
4. Save your changes and close the file.
4. This step is not needed, but always nice to have a backup. Force push the changes to your remote branch in case you need to roll back for some reason: `git push --force origin head`
**Rebase latest changes:**
1. Get all latest changes: `git fetch --all`
2. Rebase upstream trunk on your local branch: `git rebase upstream/trunk`
3. Resolve the conflicts in you editor.
4. Stage the changes: `git add *`
5. Continue the rebasing process: `git rebase --continue`, this will popup your editor for changing the commit message, change it or keep current and close the file.
7. Push the new commit to your remote branch: `git push --force origin head`
If you have any question, please let me know.
@pvanbuijtene Thanks for your help. I think I got it right now. I just created a new local branch from trunk, cherry picked everything (my way of rebasing. ;-) ) , fixing the conflicts, squashed the local branch and force pushed it to the branch origin
holding the PR.
Great, thanks for the effort 👍
Improve handling of errors on subscribing to streams and persistent subscrptions.
Currently gRPC excpetions on subscribe do not complete the future which will result in infinite runtime of future. A client waiting for the subscription will block unnecessarily and run into timeout exception instead of the exception thrown by subscribing.
This pull request changes the behavior, that exceptions occuring before the subscription being confirmed will complete the future exceptionally.