-
Notifications
You must be signed in to change notification settings - Fork 20
Use Parsec Mock for testing #95
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
Conversation
77f4680
to
f66746d
Compare
I've investigated a bit, it seems the failures are pretty much random, couldn't rat out the exact cause. Most of my testing so far has been around whether the socket exists, as the client seems to get a connection error and I was expecting it to be due to a delay in the mock service. But even when I made sure to wait until the socket exists (and then some more), failures still occured. I can't tell what exactly is happening, as locally I've not been able to reproduce the error. My only idea for now is to just move the testing into a container and hope that solves it. |
1e7ac10
to
4b0e202
Compare
Ok, the problem here seems to be in the mock service - because of the way The fix, therefore, needs to make sure the mock service keeps polling the connection until it gets no bytes and hits a timeout. Will update this PR once I get that merged. |
Wow, nice find! I am wondering why the logs of the service do not show the following line though?
|
4b0e202
to
8211d14
Compare
It's because when it runs in a non-interactive shell the flushes seem to occur much less frequently. |
This commit changes the CI script to start Parsec Mock there. Moves the ping test from the already existing mock interface to Parsec Mock. Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
8211d14
to
3c6728e
Compare
Can't approve my own PR but this looks good 👌 Thanks for debugging this out. |
After the mock service is started, we should wait until the socket it opens becomes available. Signed-off-by: Ionut Mihalcea <ionut.mihalcea@arm.com>
@@ -33,7 +33,9 @@ fi | |||
CURRENT_PATH=$(pwd) | |||
cd parsec-mock-0.1.1 | |||
python parsec_mock/parsec_mock.py --parsec-socket $CURRENT_PATH/parsec_mock.sock & | |||
sleep 5 | |||
while [[ ! -S $CURRENT_PATH/parsec_mock.sock ]]; do | |||
sleep 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would got for 1sec, but it's not important
This commit changes the CI script to start Parsec Mock there. Moves the
ping test from the already existing mock interface to Parsec Mock.
In the future the tests in
src/core/testing
can be added in the Parsec Mock repo and used from themock_service.rs
test file. That way the test cases can benefit all clients.