Skip to content

Commit

Permalink
Remove TestAllWithoutForkingEverything
Browse files Browse the repository at this point in the history
  • Loading branch information
jkrvivian committed Nov 9, 2023
1 parent 8561076 commit e6dd308
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions pkg/protocol/engine/mempool/v1/mempool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ import (
"github.com/iotaledger/iota.go/v4/tpkg"
)

func TestMemPoolV1_InterfaceWithoutForkingEverything(t *testing.T) {
mempooltests.TestAllWithoutForkingEverything(t, newTestFramework)
}

func TestMemPoolV1_InterfaceWithForkingEverything(t *testing.T) {
mempooltests.TestAllWithForkingEverything(t, newForkingTestFramework)
mempooltests.TestAllWithForkingEverything(t, newTestFramework)
}

func TestMempoolV1_ResourceCleanup(t *testing.T) {
Expand Down Expand Up @@ -155,18 +151,3 @@ func newTestFramework(t *testing.T) *mempooltests.TestFramework {
return ledgerState.ResolveOutputState(reference)
}, mutationsFunc, workers, spenddag, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), spenddag, ledgerState, workers)
}

func newForkingTestFramework(t *testing.T) *mempooltests.TestFramework {
workers := workerpool.NewGroup(t.Name())

ledgerState := ledgertests.New(ledgertests.NewMockedState(iotago.EmptyTransactionID, 0))
spenddag := spenddagv1.New[iotago.TransactionID, mempool.StateID, vote.MockedRank](account.NewAccounts().SelectCommittee().SeatCount)

mutationsFunc := func(index iotago.SlotIndex) (kvstore.KVStore, error) {
return mapdb.NewMapDB(), nil
}

return mempooltests.NewTestFramework(t, New[vote.MockedRank](new(mempooltests.VM), func(reference mempool.StateReference) *promise.Promise[mempool.State] {
return ledgerState.ResolveOutputState(reference)
}, mutationsFunc, workers, spenddag, api.SingleVersionProvider(tpkg.TestAPI), func(error) {}), spenddag, ledgerState, workers)
}

0 comments on commit e6dd308

Please sign in to comment.