multi: run all test instances in parallel
This commit is contained in:
30 files changed
+195
-1
No files matched your search
@@ -5,6 +5,8 @@ import "testing"
|
||||
// TestChannelIDOutPointConversion ensures that the IsChanPoint always
|
||||
// recognizes its seed OutPoint for all possible values of an output index.
|
||||
func TestChannelIDOutPointConversion(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
testChanPoint := *outpoint1
|
||||
|
||||
// For a given OutPoint, we'll run through all the possible output
|
||||
@@ -30,6 +32,8 @@ func TestChannelIDOutPointConversion(t *testing.T) {
|
||||
// root outpoint (the outpoint that generated the ChannelID) is included in the
|
||||
// returned set of outpoints.
|
||||
func TestGenPossibleOutPoints(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// We'll first convert out test outpoint into a ChannelID.
|
||||
testChanPoint := *outpoint1
|
||||
chanID := NewChanIDFromOutPoint(&testChanPoint)
|
||||
|
||||
@@ -11,6 +11,8 @@ import (
|
||||
// TestFeaturesRemoteRequireError checks that we throw an error if remote peer
|
||||
// has required feature which we don't support.
|
||||
func TestFeaturesRemoteRequireError(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const (
|
||||
first = "first"
|
||||
second = "second"
|
||||
@@ -33,6 +35,8 @@ func TestFeaturesRemoteRequireError(t *testing.T) {
|
||||
// TestFeaturesLocalRequireError checks that we throw an error if local peer has
|
||||
// required feature which remote peer don't support.
|
||||
func TestFeaturesLocalRequireError(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const (
|
||||
first = "first"
|
||||
second = "second"
|
||||
@@ -55,6 +59,8 @@ func TestFeaturesLocalRequireError(t *testing.T) {
|
||||
// TestOptionalFeature checks that if remote peer don't have the feature but
|
||||
// on our side this feature is optional than we mark this feature as disabled.
|
||||
func TestOptionalFeature(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const first = "first"
|
||||
|
||||
localFeatures := NewFeatureVector([]Feature{
|
||||
@@ -82,6 +88,8 @@ func TestOptionalFeature(t *testing.T) {
|
||||
// TestSetRequireAfterInit checks that we can change the feature flag after
|
||||
// initialization.
|
||||
func TestSetRequireAfterInit(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const first = "first"
|
||||
|
||||
localFeatures := NewFeatureVector([]Feature{
|
||||
@@ -100,6 +108,8 @@ func TestSetRequireAfterInit(t *testing.T) {
|
||||
// TestDecodeEncodeFeaturesVector checks that feature vector might be
|
||||
// successfully encoded and decoded.
|
||||
func TestDecodeEncodeFeaturesVector(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const first = "first"
|
||||
|
||||
f := NewFeatureVector([]Feature{
|
||||
@@ -124,6 +134,8 @@ func TestDecodeEncodeFeaturesVector(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFeatureFlagString(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
if OptionalFlag.String() != "optional" {
|
||||
t.Fatalf("incorrect string, expected optional got %v",
|
||||
OptionalFlag.String())
|
||||
|
||||
@@ -63,6 +63,8 @@ func randFeatureVector(r *rand.Rand) *FeatureVector {
|
||||
}
|
||||
|
||||
func TestMaxOutPointIndex(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
op := wire.OutPoint{
|
||||
Index: math.MaxUint32,
|
||||
}
|
||||
@@ -74,6 +76,8 @@ func TestMaxOutPointIndex(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestEmptyMessageUnknownType(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
fakeType := MessageType(math.MaxUint16)
|
||||
if _, err := makeEmptyMessage(fakeType); err == nil {
|
||||
t.Fatalf("should not be able to make an empty message of an " +
|
||||
@@ -85,6 +89,8 @@ func TestEmptyMessageUnknownType(t *testing.T) {
|
||||
// of fuzz tests to attempt to break a primary scenario which is implemented as
|
||||
// property based testing scenario.
|
||||
func TestLightningWireProtocol(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// mainScenario is the primary test that will programmatically be
|
||||
// executed for all registered wire messages. The quick-checker within
|
||||
// testing/quick will attempt to find an input to this function, s.t
|
||||
|
||||
@@ -9,6 +9,8 @@ import (
|
||||
)
|
||||
|
||||
func TestNetAddressDisplay(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
pubKeyStr := "036a0c5ea35df8a528b98edf6f290b28676d51d0fe202b073fe677612a39c0aa09"
|
||||
pubHex, err := hex.DecodeString(pubKeyStr)
|
||||
if err != nil {
|
||||
|
||||
@@ -3,6 +3,8 @@ package lnwire
|
||||
import "testing"
|
||||
|
||||
func TestValidateAlias(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
aliasStr := "012345678901234567890"
|
||||
alias := NewAlias(aliasStr)
|
||||
if err := alias.Validate(); err != nil {
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
)
|
||||
|
||||
func TestShortChannelIDEncoding(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
var testCases = []ShortChannelID{
|
||||
{
|
||||
BlockHeight: (1 << 24) - 1,
|
||||
|
||||
@@ -9,6 +9,8 @@ import (
|
||||
)
|
||||
|
||||
func TestSignatureSerializeDeserialize(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
// Local-scoped closure to serialize and deserialize a Signature and
|
||||
// check for errors as well as check if the results are correct.
|
||||
signatureSerializeDeserialize := func(e btcec.Signature) error {
|
||||
|
||||
Reference in new issue
Block a user