Commit Graph

97 Commits

Author SHA1 Message Date
Wilmer Paulino
d4fa430ca6
Revert "lntest: always turn off gossip throttling for nodes created in itests"
This reverts commit 447c9f2c0be2512b4af0ce1ce5314f661da6952f.
2021-02-10 15:45:47 -08:00
Andras Banki-Horvath
b2ab5e8af1
itests: run etcd itests with generated ports 2021-01-08 15:39:12 +01:00
Oliver Gugger
cdcbc0376d
lntest: replace hard coded timeouts
This commit replaces most of the hard coded 10, 15, 20 and 30 second
timeouts with the default timeout. This should allow darwin users to
successfully run the parallel itests locally as well.
2020-12-08 21:37:12 +01:00
Oliver Gugger
36756c012d
lntest: use nextAvailablePort for miner and btcd backend
With the new btcd version we can specify our own listen address
generator function for any btcd nodes. This should reduce flakiness as
the previous way of getting a free port was based on just picking a
random number which lead to conflicts.
We also double the default values for connection retries and timeouts,
effectively waiting up to 4 seconds in total now.
2020-12-03 11:30:23 +01:00
Oliver Gugger
2edc3cf98f
multi: update to latest btcd version
With this commit we update btcd to the latest version which allows us to
specify the btcd binary we want to use when spinning up a new node.
2020-12-03 11:30:22 +01:00
Olaoluwa Osuntokun
447c9f2c0b
lntest: always turn off gossip throttling for nodes created in itests 2020-11-30 16:39:06 -08:00
Conner Fromknecht
82a238317c
lncfg+itest: expose configurable batch-commit-interval
This will permit a greater degree of tuning or customization depending
on various hardware/environmental factors.
2020-11-25 16:45:25 -08:00
Andras Banki-Horvath
369ae5e372
itest: move all test db files when using both etcd and bbolt
In some tests we moved channeld.db to a temp location in order to
"time travel". This commit extends the existing semantics by moving all
files, including embedded etcd db too besides the channeld.db file.
2020-11-18 15:34:45 +01:00
Andras Banki-Horvath
98342433ab
itest: add etcd flag to control if new lnd nodes should run on etcd 2020-11-18 15:34:44 +01:00
Andras Banki-Horvath
979c8497b2
itest: add icase to node log filename + restart nodes before each icase
This commit adds the icase name to the log filename, to make it simpler
to find problematic tests. Additionally after this commit we'll restart
Alice and Bob (the base harness nodes) before each icase to start with a
clean state.
2020-11-12 09:17:52 +01:00
Oliver Gugger
24adf475ce
lnd_test: add integration tests for stateless init 2020-11-07 11:24:35 +01:00
Oliver Gugger
f358a4474d
lntest: add log dir flag 2020-11-04 11:03:30 +01:00
Oliver Gugger
a50d337e42
lntest: lower initial port, add ApplyPortOffset function
To allow running multiple test tranches in parallel, we need a way to
make sure the TCP ports don't collide. We'll work with offsets for the
ports, using a different offset for each tranche.
2020-11-04 11:03:25 +01:00
yyforyongyu
310f87e271
itest: save temp miner's logs 2020-10-02 00:04:47 +08:00
yyforyongyu
d2d71476bd
lntest: init SignerClient and test DeriveSharedKey 2020-09-17 14:52:36 +08:00
Joost Jager
b6ebf3f27d
lntest: use web fee estimator in itests 2020-09-16 08:17:34 +02:00
Matheus Degiovani
91538884da lntest: wait for valid tls cert and macaroon files
This changes the wait during node connection to check both for the
existance as well as for the validity of the tls cert and macaroon
files.

This ensures that nodes in the process of starting up don't inadvertedly
cause a connection error due to not yet having written the entire file.
2020-07-13 13:24:22 -03:00
Matheus Degiovani
9f036b4310 lntest: wait for graph subscription on node init
During the channel_backup_restore/restore_during_unlock itest, the node
is restored from seed and immediately restarted. Depending on specific
timing of the machine, the test harness might not have had the graph
subscription processed before the node shuts down, causing the harness
to trigger a panic.

Reducing this to a synchronous subscription attempt means node
initialization necessarily waits until the subscription is done before
attempting to restart, reducing flakiness and ensuring correct behavior.
2020-07-13 13:24:22 -03:00
Matheus Degiovani
f52ee770f4 lntest: use ctx when not using macaroons
This forces the Dial attempt to succeed or fail before proceeding with
node setup.

We also log on the node a failure to establish the graph subscription
before panicking so that we can more easily find issues.
2020-07-13 13:24:22 -03:00
Oliver Gugger
e73c9218d7
itest: add REST API tests 2020-06-17 08:35:51 +02:00
Andras Banki-Horvath
556e3525ea misc: fix error formatting in multiple files 2020-04-24 19:15:08 +02:00
yyforyongyu
4be1a4d0ec multi: fix typos 2020-03-27 16:59:18 +08:00
Conner Fromknecht
51dbdd3b38
multi: rename key_send, key-send and key send to keysend 2020-01-16 18:37:16 -08:00
Olaoluwa Osuntokun
79948ebe1c
Merge pull request #3854 from matheusdtech/fix-hn-goroutine-leak
lntest: Don't leak node's grpc conn
2020-01-06 17:55:41 -08:00
Olaoluwa Osuntokun
aab956471d
Merge pull request #3846 from guggero/lntest-node-config
itest: make harnesses usable in external projects
2020-01-06 17:52:16 -08:00
Oliver Gugger
ae1f7348f0
lntest: fix macaroon paths
This change makes sure that all macaroons are stored in the same
folder. This makes it possible to use the lntest package in external
projects that use loop's lndclient library which currently assumes
that the admin macaroon and subserver macaroons are in the same sub
folder of lnd's data directory.
2020-01-03 09:19:18 +01:00
Oliver Gugger
ce711a1de7
lntest: specify lnd binary
Integration tests in external projects might not have the same folder
structure as lnd does. Therefore we want to allow the path to the
lnd itest binary to be configurable.
2020-01-03 09:17:23 +01:00
Oliver Gugger
b762d441cf
lntest: expose configuration of harness node
When using the lntest package for itests in external projects, it
is necessary to access a harness node's configuration, for example
to get its data directory on disk. This commit exports that
configuration.
2020-01-03 09:13:29 +01:00
Joost Jager
4273bc0ba2
lntest/itest: add key send test 2019-12-23 21:51:27 +01:00
Matheus Degiovani
67438bd006 lntest: Don't leak node's grpc conn
This changes the HarnessNode structure to hold onto the client grpc
connection made during startup so that it can close it during shutdown.

This is needed because the grpc.Dial function spins a new goroutine that
attempts to maintain an open connection to the target endpoint and
without calling Close() in the connection while shutting down the node
we leak this goroutine to the rest of the tests.
2019-12-18 14:04:07 -03:00
Matheus Degiovani
e98a92233f lntest: Use TCP ports not based in nodeID
This changes TCP port selection in integration tests from being
sequential, based on the node ID to being sequential but tested before
assigment.

This should reduce the number of flaky tests that fail due to the port
already being used by another process in the CI server.
2019-12-03 16:12:14 -03:00
Johan T. Halseth
ddbd7a68ac
lntest/node: add numActiveNodesMtx
Fixes a slight race condition that could happen since Alice and Bob are
created in different goroutines, leading to using the same listening
ports.
2019-11-21 13:57:30 +01:00
Oliver Gugger
e8df2757ae
lntest: allow client to connect with specific macaroon 2019-11-13 15:29:00 +01:00
Lars Lehtonen
085a63fee5
lntest: stdlib context 2019-09-28 15:43:42 -07:00
Conner Fromknecht
1d41d4d666
multi: move WaitPredicate, WaitNoError, WaitInvariant to lntest/wait 2019-09-19 12:46:29 -07:00
Wilmer Paulino
8f010abac5
multi: add watchtower client RPC subserver 2019-07-30 15:18:15 -07:00
Johan T. Halseth
195a868455
lntest: add flag -goroutinedump 2019-07-11 14:44:44 +02:00
Johan T. Halseth
6028722d71
lntest/node: make ProfilePort part of node config 2019-07-11 14:36:59 +02:00
Conner Fromknecht
f7da87acc4
lntest+make: build w/ watchtowerrpc tag, add grpc client to harness 2019-06-20 17:04:04 -07:00
Turtle
f2ca4e1ea0 lntest: add getters for TLSCertPath and TLSKeyPath fields 2019-06-13 20:40:56 -04:00
Wilmer Paulino
638355b603
lntest: add CPFP integration test 2019-06-11 15:06:41 -07:00
Joost Jager
7133f37bb8
routing: global probability based mission control
Previously every payment had its own local mission control state which
was in effect only for that payment. In this commit most of the local
state is removed and payments all tap into the global mission control
probability estimator.

Furthermore the decay time of pruned edges and nodes is extended, so
that observations about the network can better benefit future payment
processes.

Last, the probability function is transformed from a binary output to a
gradual curve, allowing for a better trade off between candidate routes.
2019-06-04 10:00:25 +02:00
Joost Jager
dff0387363
lntest: move itest into package 2019-05-28 21:43:23 +02:00
Johan T. Halseth
2d49ee56e2
lntest: add Name() to BackendCfg 2019-05-27 09:29:03 +02:00
Johan T. Halseth
aec00b1277
lntest+lnd_test: add Connect and Disconnect miner for BackendCfgs
This commit gives the current chainbackend the ability to connect and
disconnect the chain backend at will. We do this to let the chain
backend initiate the connection to the miner, not the other way around.

This is a preparation for using Neutrino as a backend, as it only allows
making outbound connections.

We must also move the setup of the chainbackend to after to miner, to
know the address to connect to.
2019-05-27 09:29:02 +02:00
Johan T. Halseth
b917820c5b
lntest/node: set up InvoicesClient for HarnessNode 2019-05-15 14:42:04 +02:00
Wilmer Paulino
1ad4528975
lntest: use test subscription to prevent SubscribeChannelGraph race
This race was possible due to us making a subscription request before
the ChannelRouter has started. We address it by creating a dummy
subscription before proceeding to the real one to ensure we can do so
successfully. We use a dummy one in order to not consume an update from
the real one. This addresses the common "timed out waiting for opened
channel" flake within the integration test suite since the subscription
was never properly created, so we'd never be notified of when new graph
updates were received.
2019-04-25 18:53:36 -07:00
Olaoluwa Osuntokun
d9c9d6ed73
lntest: add new ChanBackupPath method to expose channels.backup for node 2019-03-28 17:53:50 -07:00
Olaoluwa Osuntokun
e929142ff7
lntest: add new Unlock method to allow unlock of fresh node
In this commit, we convert the Unlock method to accept the
`lnrpc.UnlockWalletRequest`. This makes things a bit more generic as we
no longer need to continue to add params to the method each time a new
field is added to the Unlock method.
2019-03-28 17:53:48 -07:00
Olaoluwa Osuntokun
441f010295
lntest: add new initClientWhenReady to connect RPC then init client 2019-03-28 17:53:46 -07:00