Commit Graph

2475 Commits

Author SHA1 Message Date
Jeromy
46aa22e949 some better logging and cleanup 2015-01-02 07:42:08 +00:00
Juan Batiz-Benet
2ad23f0579 dht: fix TestLayeredGet
The test was occasionally passing because:
- it called `putLocal(key, val)`
- GetValue calls `getLocal(key)` optimistically.

cc @whyrusleeping
2015-01-02 07:42:08 +00:00
Jeromy
b4b6fe2214 a couple small fixes 2015-01-02 07:42:08 +00:00
Jeromy
07b064010e rewrite of provides to better select peers to send RPCs to
refactor test peer creation to be deterministic and reliable

a bit of cleanup trying to figure out TestGetFailure

add test to verify deterministic peer creation

switch put RPC over to use getClosestPeers

rm 0xDEADC0DE

fix queries not searching peer if its not actually closer
2015-01-02 07:42:07 +00:00
Juan Batiz-Benet
da1387fb97 Merge pull request #484 from jbenet/peerstream-transports
peerstream transports
2015-01-01 23:33:57 -08:00
Juan Batiz-Benet
8acfcebd67 use yamux as go-peerstream transport
go-peerstream update to use github.com/hashicorp/yamux
2015-01-01 23:24:09 -08:00
Juan Batiz-Benet
175af5227f secio: threadsafe
clients were already accessing secio in one thread, but it's
safer to make sure it _is_ threadsafe
2015-01-01 19:48:05 -08:00
Juan Batiz-Benet
6ad158dd14 swarm test: reporting errors fix 2015-01-01 07:05:39 -08:00
Juan Batiz-Benet
293ea03eb0 secio: buffer remainders in calls to Read()
used to return io.ErrShortBuffer, but this makes client
code much more complicated. we're already allocating
buffers when it's too large, so might as well just
keep it for later.
2015-01-01 07:05:39 -08:00
Juan Batiz-Benet
a2abf108a0 peerstream update
peerstream was updated to use pluggable transports, including
muxado. The interface was also simplified slightly.
2015-01-01 07:05:39 -08:00
Juan Batiz-Benet
5f603deecd updated spdystream (lock) 2014-12-31 07:22:00 -08:00
Juan Batiz-Benet
6fe7431597 Merge pull request #482 from jbenet/fix-spdystream
bugfix in spdystream
2014-12-31 00:41:54 -08:00
Juan Batiz-Benet
0fe9f0603b bugfix in spdystream
and updated go-peerstream

cc @whyrusleeping
2014-12-31 00:34:05 -08:00
Brian Tiger Chow
94b5b528aa Merge pull request #481 from jbenet/fix/diag
fix panic in net diag
2014-12-30 18:38:43 -05:00
Jeromy
37f79bc552 fix panic in net diag 2014-12-30 22:06:32 +00:00
Juan Batiz-Benet
1c5701cab9 Merge pull request #477 from jbenet/stream-close-fix
updated go-peerstream (close fix)
2014-12-28 04:10:50 -08:00
Juan Batiz-Benet
5c2cc6089f updated go-peerstream (close fix) 2014-12-28 04:05:57 -08:00
Brian Tiger Chow
7e0ea18e79 Merge pull request #476 from jbenet/epictest-race-fix
epictest race fix
2014-12-28 07:05:42 -05:00
Brian Tiger Chow
0587342591 doc: specify iteration order randomization 2014-12-28 06:51:33 -05:00
Juan Batiz-Benet
6bd4a6ddb2 epictest: fix mn.Peers() setup race
@maybebtc the error was not inside mocknet. the error is in
assuming the peers / nets returned follow the same order.
See:
- https://github.com/jbenet/go-ipfs/blob/master/epictest/addcat_test.go#L100
- https://gist.github.com/jbenet/a39bb9d2f16532a03bb8

if you want the results to be sorted by peer.ID before they
are returned, we can totally do that, but that's probably an
unsafe assumption to make in general-- if you do your
initialization async, the number of networks or peers may have
changed between the two calls. LMK what you prefer.

(thank you golang map chaosmonkey ;)
2014-12-27 22:59:35 -08:00
Juan Batiz-Benet
bbcddd6c1f muxer: log precisely which muxer (useful in tests) 2014-12-27 22:55:57 -08:00
Juan Batiz-Benet
2877e2e986 epictest: add setup logging 2014-12-27 22:55:34 -08:00
Brian Tiger Chow
5372f4c4d4 Merge pull request #475 from jbenet/fix-ctx-frac
frac ctx - skip time tests in travis
2014-12-26 10:43:03 -05:00
Juan Batiz-Benet
5999ae8d0d frac ctx - skip time tests in travis 2014-12-25 14:23:18 -08:00
Juan Batiz-Benet
c1cd27851e Merge pull request #474 from jbenet/hotfix/core-mock
hotfix(core/mock) set Network field
2014-12-25 13:58:50 -08:00
Brian Tiger Chow
07fa9eecbd hotfix(core/mock) set Network field 2014-12-25 15:20:54 -05:00
Brian Tiger Chow
95ba056ec3 Merge pull request #470 from jbenet/feat/use-mocknet
use `net/mocknet` in integration tests
2014-12-25 04:11:46 -05:00
Brian Tiger Chow
513c5687ed rename 2014-12-25 04:07:16 -05:00
Brian Tiger Chow
1891c8915d feat: test the three-legged cat 2014-12-25 04:07:16 -05:00
Brian Tiger Chow
abd971d393 extract initialization
refactor(epictest) Core

refactor: extract repo

fix

move core
2014-12-25 04:07:14 -05:00
Brian Tiger Chow
217611c237 use raw primitives 2014-12-25 01:18:01 -05:00
Brian Tiger Chow
589ed37bd7 rename variable 2014-12-25 01:17:52 -05:00
Brian Tiger Chow
b5fd310a31 add todo 2014-12-24 12:48:15 -05:00
Brian Tiger Chow
0172e4f2bb style(testutil) rename testutil.Peer -> testutil.Identity
cc @jbenet
2014-12-24 09:59:24 -05:00
Brian Tiger Chow
2b2ff548e6 rename to dht 2014-12-24 09:38:51 -05:00
Brian Tiger Chow
237e594a8f don't link when creating network client. rely on caller 2014-12-24 09:31:19 -05:00
Brian Tiger Chow
075841c118 rm print 2014-12-24 09:31:19 -05:00
Brian Tiger Chow
d619e4ada9 cancel on exit 2014-12-24 09:31:19 -05:00
Brian Tiger Chow
35f6ddb8fa test(integration)
It's now possible to produce the DHT issues without process
orchestration.

Test1KBInstantaneous fails

@jbenet @whyrusleeping
2014-12-24 09:31:19 -05:00
Brian Tiger Chow
ad546f935a feat(integration_test) add make task to perform benchmarks in docker env
pprof cannot be used reliably on OS X. This provides two make tasks to
collect and analyze profiling data.

To run profiling in a dockerized linux environment...
```
make // or `make collect`
```

To analyze results on host machine...
```
make analyze
```

@jbenet @whyrusleeping
2014-12-24 09:31:19 -05:00
Brian Tiger Chow
ca32a83394 wip with DHT
@whyrusleeping @jbenet this is a WIP with the DHT.

wip

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Conflicts:
	epictest/addcat_test.go
	exchange/bitswap/testnet/peernet.go
	exchange/bitswap/testutils.go
	routing/mock/centralized_server.go
	routing/mock/centralized_test.go
	routing/mock/interface.go

fix(routing/mock) fill in function definition
2014-12-24 09:31:19 -05:00
Brian Tiger Chow
14990bb556 fix(merkledag/test) panic!
https://travis-ci.org/jbenet/go-ipfs/jobs/45000756

cc @whyrusleeping @jbenet

lol this is starting to happen pretty often
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
c253590770 refactor(routing/mock) move files 2014-12-24 09:31:18 -05:00
Brian Tiger Chow
6da57c6764 feat(bitswap/testnet) impl a version of bitswap testnet that uses mockpeernet under the hood
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
85ce94c510 refactor(bitswap/testnet) rename to virtual
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
d390e31c11 refactor(bitswap/testnet) extract interface in prep for mockpeernet version
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
d5e936a2c6 ignore log output 2014-12-24 09:31:18 -05:00
Brian Tiger Chow
6cdb4c23b4 pass peer into testnet adapter method 2014-12-24 09:31:18 -05:00
Brian Tiger Chow
e017d6edc6 refactor(bitswap/testnet) slim down interface
so it'll be easier to create another implementation using the new
mocknet
2014-12-24 09:31:17 -05:00
Brian Tiger Chow
12b92f03f1 add RandPeerOrFatal test helper 2014-12-24 09:31:17 -05:00