MarketSquare / MarketSquare/Rammbock

Server Receives Binary doesn't always provide the entire message

Open
#67 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
64
Forks
48
PR merge metrics
No merged PRs in 30d

Description

I'm using Rammbock to set up a tcpServer so that I can receive and send JSON messages. I receive the binary data and then create a file from the msg string returned. I am not defining a protocol in this case.

${msg} = Server Receives Binary timeout=10
Create File ${EXECDIR}/msgReceivedbinary.out ${msg}

When there was just one message exchange within my test this was working. When I had to add an additional message exchange - ie. One JSON request is received to look up some data and then another mesasge is received soon after with a much larger message ( say 2200 bytes). I'm now getting intermittent failures. I have 7 tests in my suite. The tests will all work about 50% of the time. When I do a tcpdump I can see that the application that I'm testing is consistently sending all of the data. However, when the tests fail, the resultant string from the Server Receives Binary keyword only contains the message data up to the content length field in the json message and the json content (data between curly braces) is not present.

At one point I attempted to define a protocol that just consisted of a character string of 3000 (a size big enough to cover the data being received) but it didn't make a difference. I also attempted to add a delay to see if it was taking time to flush the file but that didn't prove to help. When I log the ${msg} string to the console I can also see that the json content is missing.

tcpdata.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the intermittent loss with the Server Receives Binary keyword, the two-message exchange, and the attached tcpdata.txt capture. Inspect the tcpServer receive path and compare its returned value with the complete data observed by tcpdump. Done means the keyword consistently returns the full larger message, including the JSON content, across the reported tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.