put all websocket sessions in a single static map#306
Conversation
duncdrum
left a comment
There was a problem hiding this comment.
@nverwer thank you for your contribution, much appreciated.
My only concern is that the desired behaviour isn't tested with the PR, so it will be tricky to maintain going forward. If you need help with creating a test within the project set-up let us know and we can figure out where to best to include it.
I've added the PR to the agenda of next weeks community call.
|
Thank you, @duncdrum . I am working on different projects, and it might take some time for me to figure out how to make an effective test. I will have a look as soon as I find the time for it. |
line-o
left a comment
There was a problem hiding this comment.
I don't think this seven character fix is blocked by a missing test. I would still want to get a test for it but this should not prevent this from going in.
|
@nverwer we discussed this PR in the community call if you can't find the time for adding the test. I'll add one via cypress once I can find the time. |
|
@duncdrum I remember the conclusion at the Community Call differently. I recall that we discussed that this could be tested manually, as we don't have the necessary test infrastructure (that @nverwer would need) available in Java within the project; that we could be pragmatic, and merge it if there is no issue identified from manual testing. I also on the call confirmed that I had previously tested this manually already and seen no issue. |
|
@adamretter It is correct that you asserted that this couldn't be tested on the existing infrastructure, we took a look and disagreed. This can be tested from within the existing test infrastructure, and so it should be. You are of course free to expand the
in a separate PR. |
There is no infrastructure in Monex for either Unit or Integration tests written in Java at present. @duncdrum How do you see this working? |
|
@adamretter you don't have to test this from within Java. We have integration test configured so I m planning to expand those. |
|
Dear all, I am on a biking holiday without a computer. I will be back next
week, and see if I can come up with a unit test.
Op di 15 jul 2025 23:33 schreef Duncan Paterson ***@***.***>:
… *duncdrum* left a comment (eXist-db/monex#306)
<#306 (comment)>
@adamretter <https://github.com/adamretter> you don't have to test this
from within Java. We have integration test configured so I m planning to
expand those.
—
Reply to this email directly, view it on GitHub
<#306 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIMEOQGIGS5DRLSKOQ4CIL3IVXTPAVCNFSM6AAAAACAOPATUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANZVG44DCMZSGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
When I wrote that, I clearly had no idea what writing a test would involve, because I have never used Cypress. I pushed my test, so that someone who knows more than I do about this stuff may try to run it. |
|
@nverwer thank you. I ll refactor this, I was out and about. |
split specs
bc96b81 to
9c64469
Compare
duncdrum
left a comment
There was a problem hiding this comment.
now with tests and green
There was a problem hiding this comment.
Test looks good. However the default port should not be 8080. Also that is already solved in this earlier PR #298 which will need to be merged before this one, and then this one will need to be rebased.
adamretter
left a comment
There was a problem hiding this comment.
Needs to have the port issue fixed as it hardcodes it in many places.
|
I will pull this in as #298 is blocked |
|
@line-o this PR should not get pulled in as is. It needs to be broken into 2 PRs. This one should only have the Websocket fix and test, it should not have the Cypress upgrade and other test refactorings in it |
|
I would pull in both PRs so I don't see the point of splitting them first. |
This fixes #305: The
console:logfunction could only send to one channel, because it could only reach one session. By putting all sessions in a static map,console:logcan find the correct session belonging to the channel it wants to log to.