mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-10 06:07:16 +01:00
multi: run all test instances in parallel
This commit is contained in:
@@ -162,6 +162,8 @@ func generateTests(t *testing.T) []deriveTest {
|
||||
// TestDeriveIndex check the correctness of index derive function by testing
|
||||
// the index corner cases.
|
||||
func TestDeriveIndex(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for _, test := range generateTests(t) {
|
||||
pos, err := test.from.deriveBitTransformations(test.to)
|
||||
if err != nil {
|
||||
@@ -218,6 +220,8 @@ var deriveElementTests = []struct {
|
||||
// TestSpecificationDeriveElement is used to check the consistency with
|
||||
// specification hash derivation function.
|
||||
func TestSpecificationDeriveElement(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for _, test := range deriveElementTests {
|
||||
// Generate seed element.
|
||||
element, err := newElementFromStr(test.seed, rootIndex)
|
||||
|
||||
@@ -10,6 +10,8 @@ import (
|
||||
// TestShaChainProducerRestore checks the ability of shachain producer to be
|
||||
// properly recreated from binary representation.
|
||||
func TestShaChainProducerRestore(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
var err error
|
||||
|
||||
seed := chainhash.DoubleHashH([]byte("shachaintest"))
|
||||
|
||||
@@ -403,6 +403,8 @@ var tests = []struct {
|
||||
// TestSpecificationShaChainInsert is used to check the consistency with
|
||||
// specification hash insert function.
|
||||
func TestSpecificationShaChainInsert(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for _, test := range tests {
|
||||
receiver := NewRevocationStore()
|
||||
|
||||
@@ -433,6 +435,8 @@ func TestSpecificationShaChainInsert(t *testing.T) {
|
||||
// TestShaChainStore checks the ability of shachain store to hold the produced
|
||||
// secrets after recovering from bytes data.
|
||||
func TestShaChainStore(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
seed := chainhash.DoubleHashH([]byte("shachaintest"))
|
||||
|
||||
sender := NewRevocationProducer(seed)
|
||||
|
||||
Reference in New Issue
Block a user