mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-11-27 15:53:41 +00:00
moved util.TerminationWaitGroup.Wait()
to the central network cleanup method Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
a5da29eb6e
commit
c44298655f
@ -4,7 +4,6 @@ import (
|
|||||||
"github.com/planetmint/planetmint-go/lib"
|
"github.com/planetmint/planetmint-go/lib"
|
||||||
"github.com/planetmint/planetmint-go/testutil/network"
|
"github.com/planetmint/planetmint-go/testutil/network"
|
||||||
"github.com/planetmint/planetmint-go/testutil/sample"
|
"github.com/planetmint/planetmint-go/testutil/sample"
|
||||||
"github.com/planetmint/planetmint-go/util"
|
|
||||||
|
|
||||||
clitestutil "github.com/planetmint/planetmint-go/testutil/cli"
|
clitestutil "github.com/planetmint/planetmint-go/testutil/cli"
|
||||||
e2etestutil "github.com/planetmint/planetmint-go/testutil/e2e"
|
e2etestutil "github.com/planetmint/planetmint-go/testutil/e2e"
|
||||||
@ -39,7 +38,6 @@ func (s *E2ETestSuite) SetupSuite() {
|
|||||||
|
|
||||||
// TearDownSuite clean up after testing
|
// TearDownSuite clean up after testing
|
||||||
func (s *E2ETestSuite) TearDownSuite() {
|
func (s *E2ETestSuite) TearDownSuite() {
|
||||||
util.TerminationWaitGroup.Wait()
|
|
||||||
s.T().Log("tearing down e2e asset test suite")
|
s.T().Log("tearing down e2e asset test suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import (
|
|||||||
e2etestutil "github.com/planetmint/planetmint-go/testutil/e2e"
|
e2etestutil "github.com/planetmint/planetmint-go/testutil/e2e"
|
||||||
"github.com/planetmint/planetmint-go/testutil/network"
|
"github.com/planetmint/planetmint-go/testutil/network"
|
||||||
"github.com/planetmint/planetmint-go/testutil/sample"
|
"github.com/planetmint/planetmint-go/testutil/sample"
|
||||||
"github.com/planetmint/planetmint-go/util"
|
|
||||||
daocli "github.com/planetmint/planetmint-go/x/dao/client/cli"
|
daocli "github.com/planetmint/planetmint-go/x/dao/client/cli"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
@ -110,7 +109,6 @@ func (s *E2ETestSuite) SetupSuite() {
|
|||||||
|
|
||||||
// TearDownSuite clean up after testing
|
// TearDownSuite clean up after testing
|
||||||
func (s *E2ETestSuite) TearDownSuite() {
|
func (s *E2ETestSuite) TearDownSuite() {
|
||||||
util.TerminationWaitGroup.Wait()
|
|
||||||
s.T().Log("tearing down e2e dao test suite")
|
s.T().Log("tearing down e2e dao test suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import (
|
|||||||
|
|
||||||
clitestutil "github.com/planetmint/planetmint-go/testutil/cli"
|
clitestutil "github.com/planetmint/planetmint-go/testutil/cli"
|
||||||
"github.com/planetmint/planetmint-go/testutil/network"
|
"github.com/planetmint/planetmint-go/testutil/network"
|
||||||
"github.com/planetmint/planetmint-go/util"
|
|
||||||
daocli "github.com/planetmint/planetmint-go/x/dao/client/cli"
|
daocli "github.com/planetmint/planetmint-go/x/dao/client/cli"
|
||||||
daotypes "github.com/planetmint/planetmint-go/x/dao/types"
|
daotypes "github.com/planetmint/planetmint-go/x/dao/types"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
@ -42,7 +41,6 @@ func (s *AssetDistributionE2ETestSuite) SetupSuite() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *AssetDistributionE2ETestSuite) TearDownSuite() {
|
func (s *AssetDistributionE2ETestSuite) TearDownSuite() {
|
||||||
util.TerminationWaitGroup.Wait()
|
|
||||||
s.T().Log("tearing down e2e dao distribution test suites")
|
s.T().Log("tearing down e2e dao distribution test suites")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,6 @@ import (
|
|||||||
"github.com/planetmint/planetmint-go/testutil/moduleobject"
|
"github.com/planetmint/planetmint-go/testutil/moduleobject"
|
||||||
"github.com/planetmint/planetmint-go/testutil/network"
|
"github.com/planetmint/planetmint-go/testutil/network"
|
||||||
"github.com/planetmint/planetmint-go/testutil/sample"
|
"github.com/planetmint/planetmint-go/testutil/sample"
|
||||||
"github.com/planetmint/planetmint-go/util"
|
|
||||||
daotypes "github.com/planetmint/planetmint-go/x/dao/types"
|
daotypes "github.com/planetmint/planetmint-go/x/dao/types"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
@ -94,7 +93,6 @@ func (s *ConsumptionE2ETestSuite) SetupSuite() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *ConsumptionE2ETestSuite) TearDownSuite() {
|
func (s *ConsumptionE2ETestSuite) TearDownSuite() {
|
||||||
util.TerminationWaitGroup.Wait()
|
|
||||||
s.T().Log("tearing down e2e dao gas consumption test suites")
|
s.T().Log("tearing down e2e dao gas consumption test suites")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import (
|
|||||||
e2etestutil "github.com/planetmint/planetmint-go/testutil/e2e"
|
e2etestutil "github.com/planetmint/planetmint-go/testutil/e2e"
|
||||||
"github.com/planetmint/planetmint-go/testutil/network"
|
"github.com/planetmint/planetmint-go/testutil/network"
|
||||||
"github.com/planetmint/planetmint-go/testutil/sample"
|
"github.com/planetmint/planetmint-go/testutil/sample"
|
||||||
"github.com/planetmint/planetmint-go/util"
|
|
||||||
daotypes "github.com/planetmint/planetmint-go/x/dao/types"
|
daotypes "github.com/planetmint/planetmint-go/x/dao/types"
|
||||||
machinetypes "github.com/planetmint/planetmint-go/x/machine/types"
|
machinetypes "github.com/planetmint/planetmint-go/x/machine/types"
|
||||||
"github.com/stretchr/testify/suite"
|
"github.com/stretchr/testify/suite"
|
||||||
@ -45,7 +44,6 @@ func (s *RestrictedMsgsE2ESuite) SetupSuite() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *RestrictedMsgsE2ESuite) TearDownSuite() {
|
func (s *RestrictedMsgsE2ESuite) TearDownSuite() {
|
||||||
util.TerminationWaitGroup.Wait()
|
|
||||||
s.T().Log("tearing down e2e dao restricted msg test suite")
|
s.T().Log("tearing down e2e dao restricted msg test suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -17,7 +17,6 @@ import (
|
|||||||
e2etestutil "github.com/planetmint/planetmint-go/testutil/e2e"
|
e2etestutil "github.com/planetmint/planetmint-go/testutil/e2e"
|
||||||
"github.com/planetmint/planetmint-go/testutil/network"
|
"github.com/planetmint/planetmint-go/testutil/network"
|
||||||
"github.com/planetmint/planetmint-go/testutil/sample"
|
"github.com/planetmint/planetmint-go/testutil/sample"
|
||||||
"github.com/planetmint/planetmint-go/util"
|
|
||||||
daocli "github.com/planetmint/planetmint-go/x/dao/client/cli"
|
daocli "github.com/planetmint/planetmint-go/x/dao/client/cli"
|
||||||
daotypes "github.com/planetmint/planetmint-go/x/dao/types"
|
daotypes "github.com/planetmint/planetmint-go/x/dao/types"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
@ -87,7 +86,6 @@ func (s *SelectionE2ETestSuite) SetupSuite() {
|
|||||||
|
|
||||||
// TearDownSuite clean up after testing
|
// TearDownSuite clean up after testing
|
||||||
func (s *SelectionE2ETestSuite) TearDownSuite() {
|
func (s *SelectionE2ETestSuite) TearDownSuite() {
|
||||||
util.TerminationWaitGroup.Wait()
|
|
||||||
s.T().Log("tearing down e2e dao pop selection test suite")
|
s.T().Log("tearing down e2e dao pop selection test suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import (
|
|||||||
clitestutil "github.com/planetmint/planetmint-go/testutil/cli"
|
clitestutil "github.com/planetmint/planetmint-go/testutil/cli"
|
||||||
"github.com/planetmint/planetmint-go/testutil/network"
|
"github.com/planetmint/planetmint-go/testutil/network"
|
||||||
"github.com/planetmint/planetmint-go/testutil/sample"
|
"github.com/planetmint/planetmint-go/testutil/sample"
|
||||||
"github.com/planetmint/planetmint-go/util"
|
|
||||||
machinecli "github.com/planetmint/planetmint-go/x/machine/client/cli"
|
machinecli "github.com/planetmint/planetmint-go/x/machine/client/cli"
|
||||||
machinetypes "github.com/planetmint/planetmint-go/x/machine/types"
|
machinetypes "github.com/planetmint/planetmint-go/x/machine/types"
|
||||||
|
|
||||||
@ -50,7 +49,6 @@ func (s *E2ETestSuite) SetupSuite() {
|
|||||||
|
|
||||||
// TearDownSuite clean up after testing
|
// TearDownSuite clean up after testing
|
||||||
func (s *E2ETestSuite) TearDownSuite() {
|
func (s *E2ETestSuite) TearDownSuite() {
|
||||||
util.TerminationWaitGroup.Wait()
|
|
||||||
s.T().Log("tearing down e2e machine test suite")
|
s.T().Log("tearing down e2e machine test suite")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import (
|
|||||||
"github.com/planetmint/planetmint-go/config"
|
"github.com/planetmint/planetmint-go/config"
|
||||||
"github.com/planetmint/planetmint-go/lib"
|
"github.com/planetmint/planetmint-go/lib"
|
||||||
"github.com/planetmint/planetmint-go/testutil/sample"
|
"github.com/planetmint/planetmint-go/testutil/sample"
|
||||||
|
"github.com/planetmint/planetmint-go/util"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"google.golang.org/grpc"
|
"google.golang.org/grpc"
|
||||||
|
|
||||||
@ -766,6 +767,8 @@ func (n *Network) Cleanup() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// waiting for all threads to be terminated
|
||||||
|
util.TerminationWaitGroup.Wait()
|
||||||
|
|
||||||
// Give a brief pause for things to finish closing in other processes. Hopefully this helps with the address-in-use errors.
|
// Give a brief pause for things to finish closing in other processes. Hopefully this helps with the address-in-use errors.
|
||||||
// 100ms chosen randomly.
|
// 100ms chosen randomly.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user