Closed josecelano closed 2 days ago
I think I'm going to extract the duplicate code into a new package: torrust_http_protocol
These two modules:
will become one in:
packages/
├── http_protocol -> torrust-http-protocol
├── ... -> ...
└── tracker-client -> bittorrent-tracker-client
console/
└── tracker-client -> torrust-tracker-client
Realtes to: https://github.com/torrust/torrust-tracker/issues/753
This can be the first refactor. In the long term, we can consider using aquatic_http_protocol.
I think test execution times should decrease by removing the dependency on the main lib. If not, I will change the docs test to not compile and execute them. There are unit tests covering the same functionality.
cc @da2ce7
Some doc tests are very slow now.
These are the ones that take longer:
It can even crash your computer if you don't have enough memory. You can run them with:
It would be even slower, but you can execute them.
We have to find out why they are so slow now.
I guess the problem is:
For example, in this test:
We need to compile the main
torrust_tracker
package. FOr this particular case we can extract the functionality to a new package. In fact, it's duplicated. THe comment for the duplication:But in other cases, we can also do the same. If, for some reason, we cannot do it, I would not compile the example for these slow cases.
cc @mario-nt @da2ce7