From 6102c135f64e8dc5341f4b8a22498daadebb650c Mon Sep 17 00:00:00 2001 From: jules01 Date: Tue, 28 Mar 2023 15:53:56 +0300 Subject: [PATCH] - removed t.Skip from tests --- factory/api/apiResolverFactory_test.go | 4 -- .../bootstrapComponentsHandler_test.go | 18 ----- factory/bootstrap/bootstrapComponents_test.go | 24 ------- .../consensusComponentsHandler_test.go | 9 --- factory/consensus/consensusComponents_test.go | 60 ---------------- factory/core/coreComponentsHandler_test.go | 9 --- factory/core/coreComponents_test.go | 39 ----------- .../crypto/cryptoComponentsHandler_test.go | 15 ---- factory/crypto/cryptoComponents_test.go | 69 ------------------- factory/crypto/multiSignerContainer_test.go | 9 --- factory/data/dataComponentsHandler_test.go | 12 ---- factory/data/dataComponents_test.go | 24 ------- .../network/networkComponentsHandler_test.go | 9 --- factory/network/networkComponents_test.go | 18 ----- .../processing/blockProcessorCreator_test.go | 6 -- .../processComponentsHandler_test.go | 9 --- factory/processing/processComponents_test.go | 9 --- factory/state/stateComponentsHandler_test.go | 15 ---- factory/state/stateComponents_test.go | 15 ---- .../status/statusComponentsHandler_test.go | 12 ---- factory/status/statusComponents_test.go | 27 -------- .../statusCoreComponentsHandler_test.go | 9 --- .../statusCore/statusCoreComponents_test.go | 12 ---- genesis/process/genesisBlockCreator_test.go | 25 ++----- 24 files changed, 5 insertions(+), 453 deletions(-) diff --git a/factory/api/apiResolverFactory_test.go b/factory/api/apiResolverFactory_test.go index 7462ae0496e..ac0157c1ba7 100644 --- a/factory/api/apiResolverFactory_test.go +++ b/factory/api/apiResolverFactory_test.go @@ -15,10 +15,6 @@ import ( ) func TestCreateApiResolver(t *testing.T) { - if testing.Short() { - t.Skip("this is not a short test") - } - shardCoordinator := mock.NewMultiShardsCoordinatorMock(1) coreComponents := componentsMock.GetCoreComponents() cryptoComponents := componentsMock.GetCryptoComponents(coreComponents) diff --git a/factory/bootstrap/bootstrapComponentsHandler_test.go b/factory/bootstrap/bootstrapComponentsHandler_test.go index c4934611449..edea9b7ecde 100644 --- a/factory/bootstrap/bootstrapComponentsHandler_test.go +++ b/factory/bootstrap/bootstrapComponentsHandler_test.go @@ -13,9 +13,6 @@ import ( // ------------ Test ManagedBootstrapComponents -------------------- func TestNewManagedBootstrapComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() bcf, _ := bootstrap.NewBootstrapComponentsFactory(args) @@ -27,9 +24,6 @@ func TestNewManagedBootstrapComponents(t *testing.T) { func TestNewBootstrapComponentsFactory_NilFactory(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } mbc, err := bootstrap.NewManagedBootstrapComponents(nil) @@ -39,9 +33,6 @@ func TestNewBootstrapComponentsFactory_NilFactory(t *testing.T) { func TestManagedBootstrapComponents_CheckSubcomponentsNoCreate(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() bcf, _ := bootstrap.NewBootstrapComponentsFactory(args) @@ -53,9 +44,6 @@ func TestManagedBootstrapComponents_CheckSubcomponentsNoCreate(t *testing.T) { func TestManagedBootstrapComponents_Create(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() bcf, _ := bootstrap.NewBootstrapComponentsFactory(args) @@ -70,9 +58,6 @@ func TestManagedBootstrapComponents_Create(t *testing.T) { func TestManagedBootstrapComponents_CreateNilInternalMarshalizer(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() coreComponents := componentsMock.GetDefaultCoreComponents() @@ -87,9 +72,6 @@ func TestManagedBootstrapComponents_CreateNilInternalMarshalizer(t *testing.T) { func TestManagedBootstrapComponents_Close(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() diff --git a/factory/bootstrap/bootstrapComponents_test.go b/factory/bootstrap/bootstrapComponents_test.go index dcbb5a0c8c4..fa4dee8ef82 100644 --- a/factory/bootstrap/bootstrapComponents_test.go +++ b/factory/bootstrap/bootstrapComponents_test.go @@ -13,9 +13,6 @@ import ( // ------------ Test BootstrapComponentsFactory -------------------- func TestNewBootstrapComponentsFactory_OkValuesShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() @@ -27,9 +24,6 @@ func TestNewBootstrapComponentsFactory_OkValuesShouldWork(t *testing.T) { func TestNewBootstrapComponentsFactory_NilCoreComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() args.CoreComponents = nil @@ -42,9 +36,6 @@ func TestNewBootstrapComponentsFactory_NilCoreComponents(t *testing.T) { func TestNewBootstrapComponentsFactory_NilCryptoComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() args.CryptoComponents = nil @@ -57,9 +48,6 @@ func TestNewBootstrapComponentsFactory_NilCryptoComponents(t *testing.T) { func TestNewBootstrapComponentsFactory_NilNetworkComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() args.NetworkComponents = nil @@ -72,9 +60,6 @@ func TestNewBootstrapComponentsFactory_NilNetworkComponents(t *testing.T) { func TestNewBootstrapComponentsFactory_NilWorkingDir(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() args.WorkingDir = "" @@ -87,9 +72,6 @@ func TestNewBootstrapComponentsFactory_NilWorkingDir(t *testing.T) { func TestBootstrapComponentsFactory_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() @@ -103,9 +85,6 @@ func TestBootstrapComponentsFactory_CreateShouldWork(t *testing.T) { func TestBootstrapComponentsFactory_CreateBootstrapDataProviderCreationFail(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() coreComponents := componentsMock.GetDefaultCoreComponents() @@ -122,9 +101,6 @@ func TestBootstrapComponentsFactory_CreateBootstrapDataProviderCreationFail(t *t func TestBootstrapComponentsFactory_CreateEpochStartBootstrapCreationFail(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetBootStrapFactoryArgs() coreComponents := componentsMock.GetDefaultCoreComponents() diff --git a/factory/consensus/consensusComponentsHandler_test.go b/factory/consensus/consensusComponentsHandler_test.go index 20b0e5b4e3a..87d28ce6960 100644 --- a/factory/consensus/consensusComponentsHandler_test.go +++ b/factory/consensus/consensusComponentsHandler_test.go @@ -14,9 +14,6 @@ import ( // ------------ Test ManagedConsensusComponentsFactory -------------------- func TestManagedConsensusComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -36,9 +33,6 @@ func TestManagedConsensusComponents_CreateWithInvalidArgsShouldErr(t *testing.T) func TestManagedConsensusComponents_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -62,9 +56,6 @@ func TestManagedConsensusComponents_CreateShouldWork(t *testing.T) { func TestManagedConsensusComponents_Close(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) consensusArgs := componentsMock.GetConsensusArgs(shardCoordinator) diff --git a/factory/consensus/consensusComponents_test.go b/factory/consensus/consensusComponents_test.go index 0fb97ab3d4f..1fb5291510e 100644 --- a/factory/consensus/consensusComponents_test.go +++ b/factory/consensus/consensusComponents_test.go @@ -24,9 +24,6 @@ import ( // ------------ Test ConsensusComponentsFactory -------------------- func TestNewConsensusComponentsFactory_OkValuesShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -39,9 +36,6 @@ func TestNewConsensusComponentsFactory_OkValuesShouldWork(t *testing.T) { func TestNewConsensusComponentsFactory_NilCoreComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -55,9 +49,6 @@ func TestNewConsensusComponentsFactory_NilCoreComponents(t *testing.T) { func TestNewConsensusComponentsFactory_NilDataComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -71,9 +62,6 @@ func TestNewConsensusComponentsFactory_NilDataComponents(t *testing.T) { func TestNewConsensusComponentsFactory_NilCryptoComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -87,9 +75,6 @@ func TestNewConsensusComponentsFactory_NilCryptoComponents(t *testing.T) { func TestNewConsensusComponentsFactory_NilNetworkComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -103,9 +88,6 @@ func TestNewConsensusComponentsFactory_NilNetworkComponents(t *testing.T) { func TestNewConsensusComponentsFactory_NilProcessComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -119,9 +101,6 @@ func TestNewConsensusComponentsFactory_NilProcessComponents(t *testing.T) { func TestNewConsensusComponentsFactory_NilStateComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -136,9 +115,6 @@ func TestNewConsensusComponentsFactory_NilStateComponents(t *testing.T) { // ------------ Test Old Use Cases -------------------- func TestConsensusComponentsFactory_CreateGenesisBlockNotInitializedShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) consensusArgs := componentsMock.GetConsensusArgs(shardCoordinator) @@ -163,9 +139,6 @@ func TestConsensusComponentsFactory_CreateGenesisBlockNotInitializedShouldErr(t func TestConsensusComponentsFactory_CreateForShard(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -192,9 +165,6 @@ func (wp *wrappedProcessComponents) ShardCoordinator() sharding.Coordinator { func TestConsensusComponentsFactory_CreateForMeta(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -212,9 +182,6 @@ func TestConsensusComponentsFactory_CreateForMeta(t *testing.T) { func TestConsensusComponentsFactory_CreateNilShardCoordinator(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) consensusArgs := componentsMock.GetConsensusArgs(shardCoordinator) @@ -230,9 +197,6 @@ func TestConsensusComponentsFactory_CreateNilShardCoordinator(t *testing.T) { func TestConsensusComponentsFactory_CreateConsensusTopicCreateTopicError(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } localError := errors.New("error") shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -260,9 +224,6 @@ func TestConsensusComponentsFactory_CreateConsensusTopicCreateTopicError(t *test func TestConsensusComponentsFactory_CreateConsensusTopicNilMessageProcessor(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -279,9 +240,6 @@ func TestConsensusComponentsFactory_CreateConsensusTopicNilMessageProcessor(t *t func TestConsensusComponentsFactory_CreateNilSyncTimer(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -297,9 +255,6 @@ func TestConsensusComponentsFactory_CreateNilSyncTimer(t *testing.T) { func TestStartConsensus_ShardBootstrapperNilAccounts(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -315,9 +270,6 @@ func TestStartConsensus_ShardBootstrapperNilAccounts(t *testing.T) { func TestStartConsensus_ShardBootstrapperNilPoolHolder(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(1) shardCoordinator.CurrentShard = 0 @@ -336,9 +288,6 @@ func TestStartConsensus_ShardBootstrapperNilPoolHolder(t *testing.T) { func TestStartConsensus_MetaBootstrapperNilPoolHolder(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(1) shardCoordinator.CurrentShard = core.MetachainShardId @@ -365,9 +314,6 @@ func TestStartConsensus_MetaBootstrapperNilPoolHolder(t *testing.T) { func TestStartConsensus_MetaBootstrapperWrongNumberShards(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(1) args := componentsMock.GetConsensusArgs(shardCoordinator) @@ -384,9 +330,6 @@ func TestStartConsensus_MetaBootstrapperWrongNumberShards(t *testing.T) { func TestStartConsensus_ShardBootstrapperPubKeyToByteArrayError(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } localErr := errors.New("err") shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -406,9 +349,6 @@ func TestStartConsensus_ShardBootstrapperPubKeyToByteArrayError(t *testing.T) { func TestStartConsensus_ShardBootstrapperInvalidConsensusType(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetConsensusArgs(shardCoordinator) diff --git a/factory/core/coreComponentsHandler_test.go b/factory/core/coreComponentsHandler_test.go index c271963a8ea..7c5e3f3ac51 100644 --- a/factory/core/coreComponentsHandler_test.go +++ b/factory/core/coreComponentsHandler_test.go @@ -12,9 +12,6 @@ import ( // ------------ Test ManagedCoreComponents -------------------- func TestManagedCoreComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreArgs := componentsMock.GetCoreArgs() coreArgs.Config.Marshalizer = config.MarshalizerConfig{ @@ -31,9 +28,6 @@ func TestManagedCoreComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { func TestManagedCoreComponents_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreArgs := componentsMock.GetCoreArgs() coreComponentsFactory, _ := coreComp.NewCoreComponentsFactory(coreArgs) @@ -75,9 +69,6 @@ func TestManagedCoreComponents_CreateShouldWork(t *testing.T) { func TestManagedCoreComponents_Close(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreArgs := componentsMock.GetCoreArgs() coreComponentsFactory, _ := coreComp.NewCoreComponentsFactory(coreArgs) diff --git a/factory/core/coreComponents_test.go b/factory/core/coreComponents_test.go index 6c8981e0812..12b2833d19d 100644 --- a/factory/core/coreComponents_test.go +++ b/factory/core/coreComponents_test.go @@ -14,9 +14,6 @@ import ( func TestNewCoreComponentsFactory_OkValuesShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() ccf, _ := coreComp.NewCoreComponentsFactory(args) @@ -26,9 +23,6 @@ func TestNewCoreComponentsFactory_OkValuesShouldWork(t *testing.T) { func TestCoreComponentsFactory_CreateCoreComponentsNoHasherConfigShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() args.Config = config.Config{ @@ -46,9 +40,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsNoHasherConfigShouldErr(t *te func TestCoreComponentsFactory_CreateCoreComponentsInvalidHasherConfigShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() args.Config = config.Config{ @@ -69,9 +60,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsInvalidHasherConfigShouldErr( func TestCoreComponentsFactory_CreateCoreComponentsNoInternalMarshallerConfigShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() args.Config = config.Config{ @@ -88,9 +76,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsNoInternalMarshallerConfigSho func TestCoreComponentsFactory_CreateCoreComponentsInvalidInternalMarshallerConfigShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() args.Config = config.Config{ @@ -111,9 +96,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsInvalidInternalMarshallerConf func TestCoreComponentsFactory_CreateCoreComponentsNoVmMarshallerConfigShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() args.Config = config.Config{ @@ -134,9 +116,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsNoVmMarshallerConfigShouldErr func TestCoreComponentsFactory_CreateCoreComponentsInvalidVmMarshallerConfigShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() args.Config = config.Config{ @@ -160,9 +139,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsInvalidVmMarshallerConfigShou func TestCoreComponentsFactory_CreateCoreComponentsNoTxSignMarshallerConfigShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() args.Config = config.Config{ @@ -186,9 +162,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsNoTxSignMarshallerConfigShoul func TestCoreComponentsFactory_CreateCoreComponentsInvalidTxSignMarshallerConfigShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() args.Config = config.Config{ @@ -215,9 +188,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsInvalidTxSignMarshallerConfig func TestCoreComponentsFactory_CreateCoreComponentsInvalidValPubKeyConverterShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() args.Config.ValidatorPubkeyConverter.Type = "invalid" @@ -230,9 +200,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsInvalidValPubKeyConverterShou func TestCoreComponentsFactory_CreateCoreComponentsInvalidAddrPubKeyConverterShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() args.Config.AddressPubkeyConverter.Type = "invalid" @@ -245,9 +212,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsInvalidAddrPubKeyConverterSho func TestCoreComponentsFactory_CreateCoreComponentsShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() ccf, _ := coreComp.NewCoreComponentsFactory(args) @@ -260,9 +224,6 @@ func TestCoreComponentsFactory_CreateCoreComponentsShouldWork(t *testing.T) { // ------------ Test CoreComponents -------------------- func TestCoreComponents_CloseShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCoreArgs() ccf, _ := coreComp.NewCoreComponentsFactory(args) diff --git a/factory/crypto/cryptoComponentsHandler_test.go b/factory/crypto/cryptoComponentsHandler_test.go index 218f84c43f2..f16e97be957 100644 --- a/factory/crypto/cryptoComponentsHandler_test.go +++ b/factory/crypto/cryptoComponentsHandler_test.go @@ -13,9 +13,6 @@ import ( // ------------ Test ManagedCryptoComponents -------------------- func TestManagedCryptoComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -30,9 +27,6 @@ func TestManagedCryptoComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { func TestManagedCryptoComponents_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -61,9 +55,6 @@ func TestManagedCryptoComponents_CreateShouldWork(t *testing.T) { func TestManagedCryptoComponents_CheckSubcomponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } managedCryptoComponents := getManagedCryptoComponents(t) @@ -73,9 +64,6 @@ func TestManagedCryptoComponents_CheckSubcomponents(t *testing.T) { func TestManagedCryptoComponents_Close(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } managedCryptoComponents := getManagedCryptoComponents(t) @@ -101,9 +89,6 @@ func getManagedCryptoComponents(t *testing.T) factory.CryptoComponentsHandler { func TestManagedCryptoComponents_Clone(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) diff --git a/factory/crypto/cryptoComponents_test.go b/factory/crypto/cryptoComponents_test.go index 1f0496b129f..da1ecf53a5d 100644 --- a/factory/crypto/cryptoComponents_test.go +++ b/factory/crypto/cryptoComponents_test.go @@ -17,9 +17,6 @@ import ( func TestNewCryptoComponentsFactory_NiCoreComponentsHandlerShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetCryptoArgs(nil) ccf, err := cryptoComp.NewCryptoComponentsFactory(args) @@ -29,9 +26,6 @@ func TestNewCryptoComponentsFactory_NiCoreComponentsHandlerShouldErr(t *testing. func TestNewCryptoComponentsFactory_NilPemFileShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -43,9 +37,6 @@ func TestNewCryptoComponentsFactory_NilPemFileShouldErr(t *testing.T) { func TestCryptoComponentsFactory_CreateCryptoParamsNilKeyLoaderShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -58,9 +49,6 @@ func TestCryptoComponentsFactory_CreateCryptoParamsNilKeyLoaderShouldErr(t *test func TestNewCryptoComponentsFactory_OkValsShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -71,9 +59,6 @@ func TestNewCryptoComponentsFactory_OkValsShouldWork(t *testing.T) { func TestNewCryptoComponentsFactory_DisabledSigShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -85,9 +70,6 @@ func TestNewCryptoComponentsFactory_DisabledSigShouldWork(t *testing.T) { func TestNewCryptoComponentsFactory_CreateInvalidConsensusTypeShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -101,9 +83,6 @@ func TestNewCryptoComponentsFactory_CreateInvalidConsensusTypeShouldErr(t *testi func TestCryptoComponentsFactory_CreateShouldErrDueToMissingConfig(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -124,9 +103,6 @@ func TestCryptoComponentsFactory_CreateShouldErrDueToMissingConfig(t *testing.T) func TestCryptoComponentsFactory_CreateInvalidMultiSigHasherShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -141,9 +117,6 @@ func TestCryptoComponentsFactory_CreateInvalidMultiSigHasherShouldErr(t *testing func TestCryptoComponentsFactory_CreateOK(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -156,9 +129,6 @@ func TestCryptoComponentsFactory_CreateOK(t *testing.T) { func TestCryptoComponentsFactory_CreateWithDisabledSig(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -172,9 +142,6 @@ func TestCryptoComponentsFactory_CreateWithDisabledSig(t *testing.T) { func TestCryptoComponentsFactory_CreateWithAutoGenerateKey(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -188,9 +155,6 @@ func TestCryptoComponentsFactory_CreateWithAutoGenerateKey(t *testing.T) { func TestCryptoComponentsFactory_CreateSingleSignerInvalidConsensusTypeShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -206,9 +170,6 @@ func TestCryptoComponentsFactory_CreateSingleSignerInvalidConsensusTypeShouldErr func TestCryptoComponentsFactory_CreateSingleSignerOK(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -223,9 +184,6 @@ func TestCryptoComponentsFactory_CreateSingleSignerOK(t *testing.T) { func TestCryptoComponentsFactory_CreateMultiSignerInvalidConsensusTypeShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -241,9 +199,6 @@ func TestCryptoComponentsFactory_CreateMultiSignerInvalidConsensusTypeShouldErr( func TestCryptoComponentsFactory_CreateMultiSignerOK(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -261,9 +216,6 @@ func TestCryptoComponentsFactory_CreateMultiSignerOK(t *testing.T) { func TestCryptoComponentsFactory_GetSuiteInvalidConsensusTypeShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -279,9 +231,6 @@ func TestCryptoComponentsFactory_GetSuiteInvalidConsensusTypeShouldErr(t *testin func TestCryptoComponentsFactory_GetSuiteOK(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -297,9 +246,6 @@ func TestCryptoComponentsFactory_GetSuiteOK(t *testing.T) { func TestCryptoComponentsFactory_CreateCryptoParamsInvalidPrivateKeyByteArrayShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -316,9 +262,6 @@ func TestCryptoComponentsFactory_CreateCryptoParamsInvalidPrivateKeyByteArraySho func TestCryptoComponentsFactory_CreateCryptoParamsLoadKeysFailShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } expectedError := errors.New("expected error") @@ -337,9 +280,6 @@ func TestCryptoComponentsFactory_CreateCryptoParamsLoadKeysFailShouldErr(t *test func TestCryptoComponentsFactory_CreateCryptoParamsOK(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) @@ -355,9 +295,6 @@ func TestCryptoComponentsFactory_CreateCryptoParamsOK(t *testing.T) { func TestCryptoComponentsFactory_GetSkPkInvalidSkBytesShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } setSk := []byte("zxwY") setPk := []byte(componentsMock.DummyPk) @@ -374,9 +311,6 @@ func TestCryptoComponentsFactory_GetSkPkInvalidSkBytesShouldErr(t *testing.T) { func TestCryptoComponentsFactory_GetSkPkInvalidPkBytesShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } setSk := []byte(componentsMock.DummySk) setPk := "0" @@ -394,9 +328,6 @@ func TestCryptoComponentsFactory_GetSkPkInvalidPkBytesShouldErr(t *testing.T) { func TestCryptoComponentsFactory_GetSkPkOK(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() args := componentsMock.GetCryptoArgs(coreComponents) diff --git a/factory/crypto/multiSignerContainer_test.go b/factory/crypto/multiSignerContainer_test.go index 82ed4b0d1a7..6a392b46d72 100644 --- a/factory/crypto/multiSignerContainer_test.go +++ b/factory/crypto/multiSignerContainer_test.go @@ -269,9 +269,6 @@ func TestContainer_sortMultiSignerConfig(t *testing.T) { func Test_getMultiSigHasherFromConfigInvalidHasherShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := createDefaultMultiSignerArgs() args.ConsensusType = "" @@ -284,9 +281,6 @@ func Test_getMultiSigHasherFromConfigInvalidHasherShouldErr(t *testing.T) { func Test_getMultiSigHasherFromConfigMismatchConsensusTypeMultiSigHasher(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := createDefaultMultiSignerArgs() args.MultiSigHasherType = "sha256" @@ -298,9 +292,6 @@ func Test_getMultiSigHasherFromConfigMismatchConsensusTypeMultiSigHasher(t *test func Test_getMultiSigHasherFromConfigOK(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := createDefaultMultiSignerArgs() args.ConsensusType = "bls" diff --git a/factory/data/dataComponentsHandler_test.go b/factory/data/dataComponentsHandler_test.go index f59f99e6948..85c6e84f55a 100644 --- a/factory/data/dataComponentsHandler_test.go +++ b/factory/data/dataComponentsHandler_test.go @@ -13,9 +13,6 @@ import ( // ------------ Test ManagedDataComponents -------------------- func TestManagedDataComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -31,9 +28,6 @@ func TestManagedDataComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { func TestManagedDataComponents_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -54,9 +48,6 @@ func TestManagedDataComponents_CreateShouldWork(t *testing.T) { func TestManagedDataComponents_Close(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -73,9 +64,6 @@ func TestManagedDataComponents_Close(t *testing.T) { func TestManagedDataComponents_Clone(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) diff --git a/factory/data/dataComponents_test.go b/factory/data/dataComponents_test.go index a5de1d1d442..2714951ef7c 100644 --- a/factory/data/dataComponents_test.go +++ b/factory/data/dataComponents_test.go @@ -14,9 +14,6 @@ import ( func TestNewDataComponentsFactory_NilShardCoordinatorShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) coreComponents := componentsMock.GetCoreComponents() @@ -30,9 +27,6 @@ func TestNewDataComponentsFactory_NilShardCoordinatorShouldErr(t *testing.T) { func TestNewDataComponentsFactory_NilCoreComponentsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args := componentsMock.GetDataArgs(nil, shardCoordinator) @@ -45,9 +39,6 @@ func TestNewDataComponentsFactory_NilCoreComponentsShouldErr(t *testing.T) { func TestNewDataComponentsFactory_NilEpochStartNotifierShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) coreComponents := componentsMock.GetCoreComponents() @@ -61,9 +52,6 @@ func TestNewDataComponentsFactory_NilEpochStartNotifierShouldErr(t *testing.T) { func TestNewDataComponentsFactory_OkValsShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) coreComponents := componentsMock.GetCoreComponents() @@ -75,9 +63,6 @@ func TestNewDataComponentsFactory_OkValsShouldWork(t *testing.T) { func TestDataComponentsFactory_CreateShouldErrDueBadConfig(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) coreComponents := componentsMock.GetCoreComponents() @@ -93,9 +78,6 @@ func TestDataComponentsFactory_CreateShouldErrDueBadConfig(t *testing.T) { func TestDataComponentsFactory_CreateForShardShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -110,9 +92,6 @@ func TestDataComponentsFactory_CreateForShardShouldWork(t *testing.T) { func TestDataComponentsFactory_CreateForMetaShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -129,9 +108,6 @@ func TestDataComponentsFactory_CreateForMetaShouldWork(t *testing.T) { // ------------ Test DataComponents -------------------- func TestManagedDataComponents_CloseShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) diff --git a/factory/network/networkComponentsHandler_test.go b/factory/network/networkComponentsHandler_test.go index e40ca1dcee8..03da0ee915a 100644 --- a/factory/network/networkComponentsHandler_test.go +++ b/factory/network/networkComponentsHandler_test.go @@ -12,9 +12,6 @@ import ( // ------------ Test ManagedNetworkComponents -------------------- func TestManagedNetworkComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } networkArgs := componentsMock.GetNetworkFactoryArgs() networkArgs.P2pConfig.Node.Port = "invalid" @@ -28,9 +25,6 @@ func TestManagedNetworkComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { func TestManagedNetworkComponents_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } networkArgs := componentsMock.GetNetworkFactoryArgs() networkComponentsFactory, _ := networkComp.NewNetworkComponentsFactory(networkArgs) @@ -58,9 +52,6 @@ func TestManagedNetworkComponents_CreateShouldWork(t *testing.T) { func TestManagedNetworkComponents_CheckSubcomponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } networkArgs := componentsMock.GetNetworkFactoryArgs() networkComponentsFactory, _ := networkComp.NewNetworkComponentsFactory(networkArgs) diff --git a/factory/network/networkComponents_test.go b/factory/network/networkComponents_test.go index 205d3ed5249..0fdd190aa72 100644 --- a/factory/network/networkComponents_test.go +++ b/factory/network/networkComponents_test.go @@ -15,9 +15,6 @@ import ( func TestNewNetworkComponentsFactory_NilStatusHandlerShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetNetworkFactoryArgs() args.StatusHandler = nil @@ -28,9 +25,6 @@ func TestNewNetworkComponentsFactory_NilStatusHandlerShouldErr(t *testing.T) { func TestNewNetworkComponentsFactory_NilMarshalizerShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetNetworkFactoryArgs() args.Marshalizer = nil @@ -41,9 +35,6 @@ func TestNewNetworkComponentsFactory_NilMarshalizerShouldErr(t *testing.T) { func TestNewNetworkComponentsFactory_OkValsShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetNetworkFactoryArgs() ncf, err := networkComp.NewNetworkComponentsFactory(args) @@ -53,9 +44,6 @@ func TestNewNetworkComponentsFactory_OkValsShouldWork(t *testing.T) { func TestNetworkComponentsFactory_CreateShouldErrDueToBadConfig(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetNetworkFactoryArgs() args.MainConfig = config.Config{} @@ -70,9 +58,6 @@ func TestNetworkComponentsFactory_CreateShouldErrDueToBadConfig(t *testing.T) { func TestNetworkComponentsFactory_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetNetworkFactoryArgs() ncf, _ := networkComp.NewNetworkComponentsFactory(args) @@ -86,9 +71,6 @@ func TestNetworkComponentsFactory_CreateShouldWork(t *testing.T) { // ------------ Test NetworkComponents -------------------- func TestNetworkComponents_CloseShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetNetworkFactoryArgs() ncf, _ := networkComp.NewNetworkComponentsFactory(args) diff --git a/factory/processing/blockProcessorCreator_test.go b/factory/processing/blockProcessorCreator_test.go index 5d85dd26931..2842b92221f 100644 --- a/factory/processing/blockProcessorCreator_test.go +++ b/factory/processing/blockProcessorCreator_test.go @@ -31,9 +31,6 @@ import ( func Test_newBlockProcessorCreatorForShard(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) pcf, err := processComp.NewProcessComponentsFactory(componentsMock.GetProcessComponentsFactoryArgs(shardCoordinator)) @@ -68,9 +65,6 @@ func Test_newBlockProcessorCreatorForShard(t *testing.T) { func Test_newBlockProcessorCreatorForMeta(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardC := mock.NewMultiShardsCoordinatorMock(1) diff --git a/factory/processing/processComponentsHandler_test.go b/factory/processing/processComponentsHandler_test.go index 62965992dcb..b8c00301261 100644 --- a/factory/processing/processComponentsHandler_test.go +++ b/factory/processing/processComponentsHandler_test.go @@ -14,9 +14,6 @@ import ( // ------------ Test TestManagedProcessComponents -------------------- func TestManagedProcessComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) processArgs := componentsMock.GetProcessComponentsFactoryArgs(shardCoordinator) @@ -31,9 +28,6 @@ func TestManagedProcessComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { func TestManagedProcessComponents_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(1) @@ -147,9 +141,6 @@ func TestManagedProcessComponents_CreateShouldWork(t *testing.T) { func TestManagedProcessComponents_Close(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) processArgs := componentsMock.GetProcessComponentsFactoryArgs(shardCoordinator) diff --git a/factory/processing/processComponents_test.go b/factory/processing/processComponents_test.go index d4b3d99c030..ebae3a2c893 100644 --- a/factory/processing/processComponents_test.go +++ b/factory/processing/processComponents_test.go @@ -24,9 +24,6 @@ import ( // ------------ Test TestProcessComponents -------------------- func TestProcessComponents_CloseShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) processArgs := componentsMock.GetProcessComponentsFactoryArgs(shardCoordinator) @@ -42,9 +39,6 @@ func TestProcessComponents_CloseShouldWork(t *testing.T) { func TestProcessComponentsFactory_CreateWithInvalidTxAccumulatorTimeExpectError(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) processArgs := componentsMock.GetProcessComponentsFactoryArgs(shardCoordinator) @@ -60,9 +54,6 @@ func TestProcessComponentsFactory_CreateWithInvalidTxAccumulatorTimeExpectError( func TestProcessComponents_IndexGenesisBlocks(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(1) processArgs := componentsMock.GetProcessComponentsFactoryArgs(shardCoordinator) diff --git a/factory/state/stateComponentsHandler_test.go b/factory/state/stateComponentsHandler_test.go index d055e80efad..91932d43391 100644 --- a/factory/state/stateComponentsHandler_test.go +++ b/factory/state/stateComponentsHandler_test.go @@ -15,9 +15,6 @@ import ( // ------------ Test ManagedStateComponents -------------------- func TestManagedStateComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -33,9 +30,6 @@ func TestManagedStateComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { func TestManagedStateComponents_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -58,9 +52,6 @@ func TestManagedStateComponents_CreateShouldWork(t *testing.T) { func TestManagedStateComponents_Close(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -77,9 +68,6 @@ func TestManagedStateComponents_Close(t *testing.T) { func TestManagedStateComponents_CheckSubcomponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -95,9 +83,6 @@ func TestManagedStateComponents_CheckSubcomponents(t *testing.T) { func TestManagedStateComponents_Setters(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) diff --git a/factory/state/stateComponents_test.go b/factory/state/stateComponents_test.go index c45259758b7..3dc6ef7aee1 100644 --- a/factory/state/stateComponents_test.go +++ b/factory/state/stateComponents_test.go @@ -12,9 +12,6 @@ import ( func TestNewStateComponentsFactory_NilShardCoordinatorShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -28,9 +25,6 @@ func TestNewStateComponentsFactory_NilShardCoordinatorShouldErr(t *testing.T) { func TestNewStateComponentsFactory_NilCoreComponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -44,9 +38,6 @@ func TestNewStateComponentsFactory_NilCoreComponents(t *testing.T) { func TestNewStateComponentsFactory_ShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -59,9 +50,6 @@ func TestNewStateComponentsFactory_ShouldWork(t *testing.T) { func TestStateComponentsFactory_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) @@ -77,9 +65,6 @@ func TestStateComponentsFactory_CreateShouldWork(t *testing.T) { // ------------ Test StateComponents -------------------- func TestStateComponents_CloseShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } coreComponents := componentsMock.GetCoreComponents() shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) diff --git a/factory/status/statusComponentsHandler_test.go b/factory/status/statusComponentsHandler_test.go index 702d911842a..f021cbb4284 100644 --- a/factory/status/statusComponentsHandler_test.go +++ b/factory/status/statusComponentsHandler_test.go @@ -14,9 +14,6 @@ import ( // ------------ Test ManagedStatusComponents -------------------- func TestManagedStatusComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) statusArgs, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) @@ -36,9 +33,6 @@ func TestManagedStatusComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { func TestManagedStatusComponents_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) statusArgs, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) @@ -56,9 +50,6 @@ func TestManagedStatusComponents_CreateShouldWork(t *testing.T) { func TestManagedStatusComponents_Close(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) statusArgs, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) @@ -73,9 +64,6 @@ func TestManagedStatusComponents_Close(t *testing.T) { func TestManagedStatusComponents_CheckSubcomponents(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) statusArgs, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) diff --git a/factory/status/statusComponents_test.go b/factory/status/statusComponents_test.go index 7a1f0ee83ad..3a52d8bf06e 100644 --- a/factory/status/statusComponents_test.go +++ b/factory/status/statusComponents_test.go @@ -18,9 +18,6 @@ import ( func TestNewStatusComponentsFactory_NilCoreComponentsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) @@ -32,9 +29,6 @@ func TestNewStatusComponentsFactory_NilCoreComponentsShouldErr(t *testing.T) { func TestNewStatusComponentsFactory_NilNodesCoordinatorShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) @@ -46,9 +40,6 @@ func TestNewStatusComponentsFactory_NilNodesCoordinatorShouldErr(t *testing.T) { func TestNewStatusComponentsFactory_NilEpochStartNotifierShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) @@ -60,9 +51,6 @@ func TestNewStatusComponentsFactory_NilEpochStartNotifierShouldErr(t *testing.T) func TestNewStatusComponentsFactory_NilNetworkComponentsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) @@ -74,9 +62,6 @@ func TestNewStatusComponentsFactory_NilNetworkComponentsShouldErr(t *testing.T) func TestNewStatusComponentsFactory_NilShardCoordinatorShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) @@ -88,9 +73,6 @@ func TestNewStatusComponentsFactory_NilShardCoordinatorShouldErr(t *testing.T) { func TestNewStatusComponents_InvalidRoundDurationShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) coreArgs := componentsMock.GetCoreArgs() @@ -130,9 +112,6 @@ func TestNewStatusComponents_InvalidRoundDurationShouldErr(t *testing.T) { func TestNewStatusComponentsFactory_ShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) @@ -143,9 +122,6 @@ func TestNewStatusComponentsFactory_ShouldWork(t *testing.T) { func TestStatusComponentsFactory_Create(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) args, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) @@ -160,9 +136,6 @@ func TestStatusComponentsFactory_Create(t *testing.T) { // ------------ Test StatusComponents -------------------- func TestStatusComponents_CloseShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } shardCoordinator := mock.NewMultiShardsCoordinatorMock(2) statusArgs, _ := componentsMock.GetStatusComponentsFactoryArgsAndProcessComponents(shardCoordinator) diff --git a/factory/statusCore/statusCoreComponentsHandler_test.go b/factory/statusCore/statusCoreComponentsHandler_test.go index d6cd676833d..ea12dbcb993 100644 --- a/factory/statusCore/statusCoreComponentsHandler_test.go +++ b/factory/statusCore/statusCoreComponentsHandler_test.go @@ -10,9 +10,6 @@ import ( func TestManagedStatusCoreComponents_CreateWithInvalidArgsShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetStatusCoreArgs(componentsMock.GetDefaultCoreComponents()) args.Config.ResourceStats.RefreshIntervalInSec = 0 @@ -29,9 +26,6 @@ func TestManagedStatusCoreComponents_CreateWithInvalidArgsShouldErr(t *testing.T func TestManagedStatusCoreComponents_CreateShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetStatusCoreArgs(componentsMock.GetCoreComponents()) statusCoreComponentsFactory, err := statusCore.NewStatusCoreComponentsFactory(args) @@ -51,9 +45,6 @@ func TestManagedStatusCoreComponents_CreateShouldWork(t *testing.T) { func TestManagedCoreComponents_Close(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetStatusCoreArgs(componentsMock.GetCoreComponents()) statusCoreComponentsFactory, err := statusCore.NewStatusCoreComponentsFactory(args) diff --git a/factory/statusCore/statusCoreComponents_test.go b/factory/statusCore/statusCoreComponents_test.go index 66c5e6c07ea..f54706fe8f0 100644 --- a/factory/statusCore/statusCoreComponents_test.go +++ b/factory/statusCore/statusCoreComponents_test.go @@ -18,9 +18,6 @@ import ( func TestNewStatusCoreComponentsFactory(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } t.Run("nil core components should error", func(t *testing.T) { t.Parallel() @@ -96,9 +93,6 @@ func TestNewStatusCoreComponentsFactory(t *testing.T) { func TestStatusCoreComponentsFactory_InvalidValueShouldErr(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetStatusCoreArgs(componentsMock.GetCoreComponents()) args.Config = config.Config{ @@ -116,9 +110,6 @@ func TestStatusCoreComponentsFactory_InvalidValueShouldErr(t *testing.T) { func TestStatusCoreComponentsFactory_CreateStatusCoreComponentsShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetStatusCoreArgs(componentsMock.GetCoreComponents()) sccf, err := statusCore.NewStatusCoreComponentsFactory(args) @@ -132,9 +123,6 @@ func TestStatusCoreComponentsFactory_CreateStatusCoreComponentsShouldWork(t *tes // ------------ Test CoreComponents -------------------- func TestStatusCoreComponents_CloseShouldWork(t *testing.T) { t.Parallel() - if testing.Short() { - t.Skip("this is not a short test") - } args := componentsMock.GetStatusCoreArgs(componentsMock.GetCoreComponents()) sccf, err := statusCore.NewStatusCoreComponentsFactory(args) diff --git a/genesis/process/genesisBlockCreator_test.go b/genesis/process/genesisBlockCreator_test.go index 067412c9aad..e324446f8b3 100644 --- a/genesis/process/genesisBlockCreator_test.go +++ b/genesis/process/genesisBlockCreator_test.go @@ -1,3 +1,8 @@ +//go:build !race +// +build !race + +// TODO reinstate test after Wasm VM pointer fix + package process import ( @@ -205,11 +210,6 @@ func createMockArgument( } func TestGenesisBlockCreator_CreateGenesisBlockAfterHardForkShouldCreateSCResultingAddresses(t *testing.T) { - // TODO reinstate test after Wasm VM pointer fix - if testing.Short() { - t.Skip("cannot run with -race -short; requires Wasm VM fix") - } - scAddressBytes, _ := hex.DecodeString("00000000000000000500761b8c4a25d3979359223208b412285f635e71300102") initialNodesSetup := &mock.InitialNodesHandlerStub{ InitialNodesInfoCalled: func() (map[uint32][]nodesCoordinator.GenesisNodeInfoHandler, map[uint32][]nodesCoordinator.GenesisNodeInfoHandler) { @@ -270,11 +270,6 @@ func TestGenesisBlockCreator_CreateGenesisBlockAfterHardForkShouldCreateSCResult } func TestGenesisBlockCreator_CreateGenesisBlocksJustDelegationShouldWorkAndDNS(t *testing.T) { - // TODO reinstate test after Wasm VM pointer fix - if testing.Short() { - t.Skip("cannot run with -race -short; requires Wasm VM fix") - } - scAddressBytes, _ := hex.DecodeString("00000000000000000500761b8c4a25d3979359223208b412285f635e71300102") stakedAddr, _ := hex.DecodeString("b00102030405060708090001020304050607080900010203040506070809000b") initialNodesSetup := &mock.InitialNodesHandlerStub{ @@ -319,11 +314,6 @@ func TestGenesisBlockCreator_CreateGenesisBlocksJustDelegationShouldWorkAndDNS(t } func TestGenesisBlockCreator_CreateGenesisBlocksStakingAndDelegationShouldWorkAndDNS(t *testing.T) { - // TODO reinstate test after Wasm VM pointer fix - if testing.Short() { - t.Skip("cannot run with -race -short; requires Wasm VM fix") - } - scAddressBytes, _ := hex.DecodeString("00000000000000000500761b8c4a25d3979359223208b412285f635e71300102") stakedAddr, _ := hex.DecodeString("b00102030405060708090001020304050607080900010203040506070809000b") stakedAddr2, _ := hex.DecodeString("d00102030405060708090001020304050607080900010203040506070809000d") @@ -399,11 +389,6 @@ func TestGenesisBlockCreator_CreateGenesisBlocksStakingAndDelegationShouldWorkAn } func TestGenesisBlockCreator_GetIndexingDataShouldWork(t *testing.T) { - // TODO reinstate test after Wasm VM pointer fix - if testing.Short() { - t.Skip("cannot run with -race -short; requires Wasm VM fix") - } - scAddressBytes, _ := hex.DecodeString("00000000000000000500761b8c4a25d3979359223208b412285f635e71300102") stakedAddr, _ := hex.DecodeString("b00102030405060708090001020304050607080900010203040506070809000b") stakedAddr2, _ := hex.DecodeString("d00102030405060708090001020304050607080900010203040506070809000d")