Commit Graph

16 Commits

Author SHA1 Message Date
Peter Šurda ca567acab3
Put uploads into a separate thread
- instead of being processed in the ReceiveQueue thread, uploads are now done
  in a dedicated thread. Only the parsing is done in ReceiveQueue thread.
- the UploadThread is modelled based on the DownloadThred, but simpler.
- it checks for intersection attack, eliminates duplicates and restricts the
  write buffer size to 2MB (may still grow slightly higher if too many big
  objects are requested, but the absolute limit appears to be about 4.5MB in the
  worst case scenario).
- the restriction of the write buffer may cause some upload throttling (to
  about 2MB per second per connection), but can be optimised later
- fixes #1414
2018-12-20 20:34:01 +01:00
Dmitri Bogomolov ae2cebb2a6
Minimal test for clientStatus consistency 2018-11-01 16:52:33 +02:00
Dmitri Bogomolov 1c2bef46c1
e417b62 allows to remove sleep from cleaner test 2018-10-22 17:18:25 +03:00
Dmitri Bogomolov daf556ca50
Added tests for knownnodes:
- import of pickled knownnodes;
  - default knownnodes if nothing imported;
  - knownnodes starvation (#1335), demanded changes in networkthread.
2018-10-22 17:18:24 +03:00
Dmitri Bogomolov 2bbda63b9c
Added address length check 2018-10-22 17:18:24 +03:00
Dmitri Bogomolov c8a781c7c5
Marked use of random, subprocess and xmlrpclib in tests
for skipping by bandit
2018-10-22 17:18:24 +03:00
Dmitri Bogomolov cfdb6beb54
Moved tests from helper_msgcoding into TestCore.test_msgcoding() 2018-10-22 17:18:24 +03:00
Dmitri Bogomolov ea8991c05b
Test case for config, not runs pybitmessage yet 2018-10-22 17:18:24 +03:00
Dmitri Bogomolov d8b4682ee9
Style fixes and docstrings for tests 2018-10-22 17:18:23 +03:00
Dmitri Bogomolov a3300ba8f1
A test case for core (which will be ran in main thread) 2018-10-22 17:18:23 +03:00
Dmitri Bogomolov 51df0507e2
Fixed signal files creation 2018-10-22 17:18:23 +03:00
Dmitri Bogomolov 589900f7c3
Added a test for chan creation/joining 2018-10-22 17:18:23 +03:00
Dmitri Bogomolov c49c131929
New test case class hierarchy:
- TestProcessProto has common setUpClass and tearDownClass methods
  - TestProcess is for testing the PyBitmessage process (using psutil)
2018-10-22 17:18:23 +03:00
Dmitri Bogomolov c28d463261
Added doctstrings for all tests and a test for sendBroadcast API command 2018-10-22 17:18:23 +03:00
Dmitri Bogomolov 981dddade4
Added test for createRandomAddress API command 2018-10-22 17:18:23 +03:00
Dmitri Bogomolov 10346c84aa
Basic API tests and simple apinotify handler 2018-10-22 17:18:22 +03:00