Skip to content

Commit

Permalink
Merge branch 'master' into add-semi-integration-test
Browse files Browse the repository at this point in the history
  • Loading branch information
iulianpascalau authored Mar 29, 2023
2 parents cfaaaca + de6b44a commit 7ed3bab
Show file tree
Hide file tree
Showing 24 changed files with 5 additions and 453 deletions.
4 changes: 0 additions & 4 deletions factory/api/apiResolverFactory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 0 additions & 18 deletions factory/bootstrap/bootstrapComponentsHandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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()
Expand All @@ -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()

Expand Down
24 changes: 0 additions & 24 deletions factory/bootstrap/bootstrapComponents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 = ""
Expand All @@ -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()

Expand All @@ -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()
Expand All @@ -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()
Expand Down
9 changes: 0 additions & 9 deletions factory/consensus/consensusComponentsHandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
60 changes: 0 additions & 60 deletions factory/consensus/consensusComponents_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
Loading

0 comments on commit 7ed3bab

Please sign in to comment.