fixed the TestAbort_ERC20_XMRMakerCancels issue (#333)

This commit is contained in:
Dmitry Holodov
2023-02-27 18:16:19 -06:00
committed by GitHub
parent b6a7047204
commit a537be03cf
2 changed files with 7 additions and 2 deletions

View File

@@ -136,8 +136,7 @@ start-daemons() {
"--contract-address=${SWAP_FACTORY_ADDR}"
# Give time for Bob and Charlie's swapd instances to fully start
# and do peer discovery.
sleep 30
sleep 5
}
stop-daemons() {

View File

@@ -556,6 +556,12 @@ func (s *IntegrationTestSuite) testAbortXMRTakerCancels(asset types.EthAsset) {
ac := rpcclient.NewClient(ctx, defaultXMRTakerSwapdEndpoint)
awsc := s.newSwapdWSClient(ctx, defaultXMRTakerSwapdWSEndpoint)
// Bob making an offer above only queues the DHT advertisement for the XMR
// namespace (the namespace for swapd hosts providing XMR offers). We need
// to wait a little extra before Alice calls Discover to ensure that the
// advertisement went out.
common.SleepWithContext(ctx, time.Millisecond*500)
peerIDs, err := ac.Discover(string(coins.ProvidesXMR), defaultDiscoverTimeout)
require.NoError(s.T(), err)
require.Equal(s.T(), 1, len(peerIDs))