Commit Graph

10 Commits

Author SHA1 Message Date
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
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 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