mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-01-09 14:18:03 -05:00
fixed the TestAbort_ERC20_XMRMakerCancels issue (#333)
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user