Skip to content

Conversation

@venfernand
Copy link
Contributor

Improve tests in the freenet.clients package

Depends on:


  • Adds improvements to the tests in the freenet.clients package.
  • Improves date and time parsing in the TimeUtil
  • Improves Cookie and ReceivedCookie classes.

Wait for all threads to start and pause on the CountDownLatch.
Then send start signal to all threads and call the method under test.
This makes invocation more concurrent and forces all threads to start at the same place.



Signed-off-by: Veniamin Fernandes <veniamin.fernandes@proton.me>
Adds improvements to assertions and code formatting


Signed-off-by: Veniamin Fernandes <veniamin.fernandes@proton.me>
Remove commented and broken parsing.
Add date and time parsing, which can parse various timestamps defined in multiple HTTP standards.
Main algorithm is defined in https://www.ietf.org/rfc/rfc6265.html#section-5.1.1

Also use newer classes from java.time package.


Signed-off-by: Veniamin Fernandes <veniamin.fernandes@proton.me>
Improved unit tests for Cookie And ReceivedCookie classes.

Split ReceivedCookie class out of Cookie class,
and removed unused parts.
Set-Cookie2 and Cookie2 format is no longer used in modern browsers.
Newer specification RFC6225 defines received cookie as key value pairs only.
ReceivedCookie uses only cookie name and value,
and others parts were not used and are removed now.



Signed-off-by: Veniamin Fernandes <veniamin.fernandes@proton.me>
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.

1 participant