Commit Graph

26 Commits

Author SHA1 Message Date
mhchia
bb0da41eda
Remove cleanup
`cleanup` cancels all tasks in the loop, including the main one run by
`run_until_complete`
2019-09-10 18:01:16 +08:00
mhchia
7f20ab781d
Fix gosssipsub tests 2019-09-03 23:37:34 +08:00
mhchia
7385a7a677
Add is_gossipsub fixture in interop test
To use the same code to test against both routers: floodsub and
gossipsub.
2019-09-03 16:49:00 +08:00
Alex Stokes
fb43728661
Mark some slow tests as such 2019-08-15 16:33:33 -07:00
Alex Stokes
3debd2c808
Run black and isort w/ the new config 2019-08-13 14:36:42 -07:00
Alex Stokes
7477b29508 run black w/ extended line length 2019-08-04 12:37:41 +08:00
Alex Stokes
7b7c8ad30d
run black over dangling files 2019-08-02 11:47:08 -07:00
NIC619
cd684aad9e
Update peer_id to type peer.ID in pubsub folder 2019-08-02 14:45:23 +08:00
mhchia
716c60ca6d
Reflect PR feedback
- Remove leftover `int` in `GossipsubParams`
- Remove default fields in tests
2019-08-01 21:38:14 +08:00
mhchia
c72dfe1dd3
Use factories and fixtures in pubsub tests
Done
- Add factories using factory-boy
- Modify fixtures and tests to use factories
- Modify tests to use fixtures and factories
- Clean up
2019-08-01 13:30:08 +08:00
Alex Stokes
0ae9840928
Run black over repo 2019-07-31 15:00:12 -07:00
mhchia
f02d38c0ee
Reflect PR feedback
* Rename `src` to `msg_forwarder` in pubsub/floodsub/gossipsub
* Rename Variables
* Sort imports
* Clean up
2019-07-29 12:09:35 +08:00
mhchia
c028aef2de
Fix all tests
- Dedup `perform_test_from_obj` and the test cases used in both
`test_floodsub` and `test_gossipsub_backward_compatibility.py`.
Therefore, they are put in the standalone file
`tests/pubsub/floodsub_integration_test_settings.py`. The functions
and testcases are imported from there then.
- IMO still need a refactor on the tests. There are still some duplicate
code.
2019-07-27 11:49:03 +08:00
mhchia
65aedcb25a
Fix several tests 2019-07-26 18:35:25 +08:00
NIC619
b0b4ddd0ca
Fix test_handle_prune 2019-07-24 11:35:14 +08:00
NIC619
99eabe49eb
Add handle_prune test 2019-07-23 23:00:43 +08:00
NIC619
42093e40ec
Add handle_graft test 2019-07-23 22:53:01 +08:00
NIC619
0cc8a205fb
Fix test and reduce number of nodes in test_join 2019-07-23 17:28:46 +08:00
NIC619
c0a3af69e0
Apply PR feedback:
Check that node is in mesh peer's mesh after subscribe
2019-07-23 16:45:54 +08:00
NIC Lin
042e0ac916
Update tests/pubsub/test_gossipsub.py
Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
2019-07-23 16:37:41 +08:00
NIC Lin
3c3a9ac90b
Update tests/pubsub/test_gossipsub.py
Co-Authored-By: Kevin Mai-Husan Chia <mhchia@users.noreply.github.com>
2019-07-23 16:37:01 +08:00
NIC619
cdbeb63879
Add test 2019-07-22 19:28:12 +08:00
NIC619
14ee44c549
Lint test and add cleanup to the end 2019-07-21 23:16:42 +08:00
NIC619
2c1c8dc8cf
Add gossipsub.join test 2019-07-21 23:16:41 +08:00
NIC619
29aae7dca4
Add gossipsub join/leave test 2019-07-19 20:16:53 +08:00
Robert Zajac
9052e8f8bd
The Gossipsub PR (#162)
* Add handle_rpc call to pubsub

* Scaffold gossipsub functions

* Add timer

* Implement most of mesh construction

* Implement emit and handle

* Implement fanout heartbeat

* Refactor emit

* some gossipsub cleanup and test

* minor lint stuff, more to come

* Implement publish

* Fix comment

* Modify pubsub/gossipsub so that floodsub tests pass using gossipsub router

* Add floodsub tests to gossipsub

* Handle case where select_from_minus, num_to_select > size(pool-minus)

* Add topic membership

* Implement handle ihave

* Implement most of iwant

* Add mcache.add and comments

* Refactor handle_ihave

* Implement stream write in handle_iwant

* Implement gossip heartbeat

* unresolved vars

* initial mcache code

* documenting mcache

* writing test/debugging mcache

* finished mcache test and debugged

* Make gossipsub backward compatibility its own file

* remove mcache prints

* DEBUGGING

* Add sender_peer_id to handle_rpc to get gossip test passing

* Modify gossipsub to make fanout work

* fanout maintenance test

* debugging gsub GOSSIP

* DEBUGGING

* debugged sender seen cachce

* adding lru, removing prints

* pylint cleanup

* Fix github comments in PR

* minor floodsub possible bugfix
2019-05-06 23:44:13 -04:00