multi: run all test instances in parallel
This commit is contained in:
30 files changed
+195
-1
No files matched your search
@@ -12,6 +12,8 @@ import (
|
||||
// TestHeapOrdering ensures that the items inserted into the heap are properly
|
||||
// retrieved in minimum order of distance.
|
||||
func TestHeapOrdering(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// First, create a blank heap, we'll use this to push on randomly
|
||||
// generated items.
|
||||
var nodeHeap distanceHeap
|
||||
|
||||
@@ -272,6 +272,8 @@ func (m *mockChainView) Stop() error {
|
||||
// TestEdgeUpdateNotification tests that when edges are updated or added,
|
||||
// a proper notification is sent of to all registered clients.
|
||||
func TestEdgeUpdateNotification(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx, cleanUp, err := createTestCtx(0)
|
||||
defer cleanUp()
|
||||
if err != nil {
|
||||
@@ -427,6 +429,8 @@ func TestEdgeUpdateNotification(t *testing.T) {
|
||||
// either join the network for the first time, or update their authenticated
|
||||
// attributes with new data.
|
||||
func TestNodeUpdateNotification(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx, cleanUp, err := createTestCtx(1)
|
||||
defer cleanUp()
|
||||
if err != nil {
|
||||
@@ -525,6 +529,8 @@ func TestNodeUpdateNotification(t *testing.T) {
|
||||
// TestNotificationCancellation tests that notifications are properly cancelled
|
||||
// when the client wishes to exit.
|
||||
func TestNotificationCancellation(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const startingBlockHeight = 101
|
||||
ctx, cleanUp, err := createTestCtx(startingBlockHeight)
|
||||
defer cleanUp()
|
||||
@@ -573,6 +579,8 @@ func TestNotificationCancellation(t *testing.T) {
|
||||
// TestChannelCloseNotification tests that channel closure notifications are
|
||||
// properly dispatched to all registered clients.
|
||||
func TestChannelCloseNotification(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const startingBlockHeight = 101
|
||||
ctx, cleanUp, err := createTestCtx(startingBlockHeight)
|
||||
defer cleanUp()
|
||||
|
||||
@@ -289,6 +289,8 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err
|
||||
}
|
||||
|
||||
func TestBasicGraphPathFinding(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
graph, cleanUp, aliases, err := parseTestGraph(basicGraphFilePath)
|
||||
defer cleanUp()
|
||||
if err != nil {
|
||||
@@ -439,6 +441,8 @@ func TestBasicGraphPathFinding(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestKShortestPathFinding(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
graph, cleanUp, aliases, err := parseTestGraph(basicGraphFilePath)
|
||||
defer cleanUp()
|
||||
if err != nil {
|
||||
@@ -498,6 +502,8 @@ func TestKShortestPathFinding(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestNewRoutePathTooLong(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// Ensure that potential paths which are over the maximum hop-limit are
|
||||
// rejected.
|
||||
graph, cleanUp, aliases, err := parseTestGraph(excessiveHopsGraphFilePath)
|
||||
@@ -539,6 +545,8 @@ func TestNewRoutePathTooLong(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPathNotAvailable(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
graph, cleanUp, _, err := parseTestGraph(basicGraphFilePath)
|
||||
defer cleanUp()
|
||||
if err != nil {
|
||||
@@ -574,6 +582,8 @@ func TestPathNotAvailable(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPathInsufficientCapacity(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
graph, cleanUp, aliases, err := parseTestGraph(basicGraphFilePath)
|
||||
defer cleanUp()
|
||||
if err != nil {
|
||||
@@ -606,6 +616,8 @@ func TestPathInsufficientCapacity(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPathInsufficientCapacityWithFee(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// TODO(roasbeef): encode live graph to json
|
||||
|
||||
// TODO(roasbeef): need to add a case, or modify the fee ratio for one
|
||||
|
||||
@@ -109,6 +109,8 @@ func createTestCtx(startingHeight uint32, testGraph ...string) (*testCtx, func()
|
||||
// within the channel router are properly returned in a sorted order, with the
|
||||
// lowest fee route coming first.
|
||||
func TestFindRoutesFeeSorting(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const startingBlockHeight = 101
|
||||
ctx, cleanUp, err := createTestCtx(startingBlockHeight, basicGraphFilePath)
|
||||
defer cleanUp()
|
||||
@@ -147,6 +149,8 @@ func TestFindRoutesFeeSorting(t *testing.T) {
|
||||
// queue is used instead. This process should continue until either a payment
|
||||
// succeeds, or all routes have been exhausted.
|
||||
func TestSendPaymentRouteFailureFallback(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const startingBlockHeight = 101
|
||||
ctx, cleanUp, err := createTestCtx(startingBlockHeight, basicGraphFilePath)
|
||||
defer cleanUp()
|
||||
@@ -210,6 +214,8 @@ func TestSendPaymentRouteFailureFallback(t *testing.T) {
|
||||
// TestAddProof checks that we can update the channel proof after channel
|
||||
// info was added to the database.
|
||||
func TestAddProof(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx, cleanup, err := createTestCtx(0)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -275,6 +281,8 @@ func TestAddProof(t *testing.T) {
|
||||
// TestAddEdgeUnknownVertexes tests that if an edge is added that contains two
|
||||
// vertex which we don't know of, then the edge is rejected.
|
||||
func TestAddEdgeUnknownVertexes(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx, cleanup, err := createTestCtx(0)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in new issue
Block a user