Commit Graph

615 Commits

Author SHA1 Message Date
Johan T. Halseth
a5f7c4872b lntest/harness: let OpenChannel take 'private' parameter 2018-01-06 17:21:49 -08:00
Olaoluwa Osuntokun
b56dcc988b
lntest: re-write loop in ConnectNodes to use WaitPredicate 2017-12-21 11:44:20 +01:00
Olaoluwa Osuntokun
6992822865
lntest: CloseChannel will wait for both nodes to show chan as active if not force
In this commit, we modify the CloseChannel to wait for both nodes to
detect that channel as being active before we attempt to close it. This
should serve to reduce many of the flakes that we’ve been seeing on
travis which were caused by node A detecting the channel as active, but
node B not, leading to a test flake under certain timing conditions.
The new function uses the recently added WaitPredicate method.
2017-12-21 11:43:17 +01:00
Olaoluwa Osuntokun
c3f84b1a47
lntest: re-write AssertChannelExists to use WaitPredicate internally
Recent changes to the funding manger’s state machine have resulted in
some additional database calls during the funding process. This has
slowed down the tests by a few ms here and there. Recent integration
test runs have begun to fail due to AssertChannelExists returning an
error as the channel hasn’t fully propagated yet. In order to remedy
this, we’ll now use WaitPredicate to poll repeatedly to ensure. This
should serve to reduce flakes encountered within the integration tests.
2017-12-21 11:35:29 +01:00
Olaoluwa Osuntokun
72147fe1e5
lntest: add new WaitPredicate helper function 2017-12-21 11:33:34 +01:00
Olaoluwa Osuntokun
2154ec130f
lntest: add new LookUpNodeByPub method to lookup active nodes by pubkey
In this commit, we add a new helper function to the NetworkHarness
struct. This helper function serves to allow test authors to look up
pointer to an active node based on its current public key.

Each time a new node is started, its public key will be re-registered
within the global nodesByPub map.
2017-12-21 11:33:04 +01:00
Matt Drollette
adf0d98194 multi: fix several typos in godoc comments 2017-12-17 18:40:05 -08:00
Johan T. Halseth
d7072c4f8f lntest/harness: set Private=false in OpenChannel 2017-12-17 18:35:34 -08:00
Jim Posen
84d7c7ee2c lntest: Refactor set up calls to NetworkHarness. 2017-12-14 20:06:23 -08:00
Jim Posen
02177a3f1c lntest: Improve HarnessNode stop logic and remove restart(). 2017-12-14 20:06:23 -08:00
Jim Posen
19ed1fb8db lntest: Add ShutdownNode method to harness.
This is preferable to calling Shutdown on the node directly so that
the harness manages the entire lifecycle of an lnd process.
2017-12-14 20:06:23 -08:00
Jim Posen
77d5f21b54 lntest: Add doc.go with package documentation. 2017-12-14 20:06:23 -08:00
Jim Posen
43e501feb9 lntest: Rename structs with proper visibility so lnd_test runs. 2017-12-14 20:06:23 -08:00
Jim Posen
3cb0705b8e lntest: Break lntest dependence on config in the main package.
This creates a new nodeConfig struct for the node in the lntest
package in order to decouple lntest from the main package.
2017-12-14 20:06:23 -08:00
Jim Posen
fd4af6da8e lntest: MOVEONLY networktest.go -> lntest package. 2017-12-14 20:06:23 -08:00