Commit Graph

21 Commits

Author SHA1 Message Date
Erik Brakkee
c3e77e6ef3 Fixed issue with throttling go routine not terminating. 2024-09-26 19:14:27 +02:00
8fe79e3c38 first integration test implemented using testcontainers. 2024-09-08 11:16:49 +02:00
db094d2a13 reverted changes to throttler for ignoring duplicate events. This caused
more problems since state is immutable but some state of agents and
client is not immutable so it ignored events that were not really
duplicates.
This reverts commit f6b0211336.
2024-09-08 11:16:49 +02:00
0801310542 updated comments of throttler 2024-09-08 11:16:49 +02:00
a99de52e56 throttler now ignoring duplicate events. 2024-09-08 11:16:49 +02:00
0cd0b543a2 multiple clients connecting to multiple agents.
Clients cannot yet be started in parallel. due to subtle issue in test
setup with accept
2024-09-08 11:16:49 +02:00
28b2545163 test for connecting clients and bidirectional communication to agent.
Required lots of rework since the GOBChannel appeared to be reading
ahead of the data it actually needed. Now using more low-level IO
to send the clientId over to the agent instead.
2024-09-08 11:16:49 +02:00
2a663c19d2 added a few tests for inmemoryconnection. 2024-09-08 11:16:49 +02:00
b65c824ca1 now using testsuite also for linkedmap 2024-09-08 11:16:49 +02:00
d3d4c7242a restructuring test code by introducing a testsupport package
Making it easy 6to start a porof server in tests.
2024-09-08 11:16:49 +02:00
276c2c0fa7 some more tests added. 2024-09-08 11:16:49 +02:00
3059a16559 table testing with go routines only really works well when standard
assertions are ued. With suite.Required() there are issues in getting
the test results correct.

Instead, use standard assertions and use suite.T().Failed() to do
early returns.
2024-09-08 11:16:49 +02:00
3f3635b056 a lot of progress in setting up tests for the communication.
Wrote ChannelReadWriter that simulates a connection inmemory.
This is used by the agentserver test for testing the initialization. The
first test is already working.
2024-09-08 11:16:49 +02:00
3776b86946 typo 2024-09-08 11:16:49 +02:00
9f90f9a2b8 now using a testsuite for the throttler tests. 2024-09-08 11:16:49 +02:00
c1ade0408d some moving around of files in the throttling package to make the
structure more clear.
2024-09-08 11:16:49 +02:00
6c6d396393 more generalization of how time is handled in the tests.
Asynchronous variant that is easier to use and multi-thread safe.
2024-09-08 11:16:49 +02:00
1bf559bb65 moved the throttler to its own package. 2024-09-08 11:16:49 +02:00
fc7977f7bb now using maps of Guid to Agent/Client in the state, working towards the definitive solution.
Using LinkedMap that preserves insertion order for the implementation and also added unit tests for that.
2024-09-08 11:16:49 +02:00
Erik Brakkee
882f97fa17 many small changes
* removed the Async utility
* now using Ping message to webclient for keep alive instaed of actual content
* added remote shell to AgentInfo
* retry of connections to the agent
* better logging for SynchronizeStreams
2024-09-08 11:16:49 +02:00
100771a7ba restructuring 2024-09-08 11:16:49 +02:00