Skip to content
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

fix(size): create new message if size changes #33

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

stephen-soltesz
Copy link
Contributor

@stephen-soltesz stephen-soltesz commented Jan 9, 2024

Previously, the server would report that the applicationBytesSent was identically the amount requested by the bytes limit parameter. However, the client would see more bytes than expected. This was due to the message size being calculated correctly but a new message not being created.

Since ScaleMessage is called unconditionally, this change now ensures that a new message is created whenever the scaled size is different than the current messageSize.

Now the server application data and the client visible application data should differ only by the size of the final measurement message.


This change is Reviewable

@coveralls
Copy link

coveralls commented Jan 9, 2024

Pull Request Test Coverage Report for Build 7467609891

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.3%) to 69.84%

Totals Coverage Status
Change from base Build 7453335104: -0.3%
Covered Lines: 873
Relevant Lines: 1250

💛 - Coveralls

Copy link
Contributor Author

@stephen-soltesz stephen-soltesz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Evidently, internal/latency1/latency1_test.go has a flaky test:

--- FAIL: TestHandler_Result (0.00s)

testing.go:1206: TempDir RemoveAll cleanup: unlinkat /tmp/TestHandler_Result4078838136: directory not empty

I've seen these before but this one seemed to be persistent this time. I'm imagining that the ttlcache is writing to the temp directory after the function returns but before the directory is fully removed. I've added a short delay at the end of the test to work around it. The change includes a TODO to add handler shutdown for a proper fix.

Reviewable status: 0 of 1 approvals obtained (waiting on @robertodauria)

Copy link
Contributor

@robertodauria robertodauria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r2, 1 of 1 files at r3, 1 of 1 files at r4.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@stephen-soltesz stephen-soltesz merged commit bc4cce9 into main Jan 10, 2024
8 checks passed
@stephen-soltesz stephen-soltesz deleted the sandbox-soltesz-scale-size branch January 10, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants