@@ -22,14 +22,15 @@ import (
22
22
"encoding/json"
23
23
"errors"
24
24
"fmt"
25
- "github.com/hyperledger/firefly/internal/metrics"
26
25
"io/ioutil"
27
26
"net/http"
28
27
"net/url"
29
28
"strings"
30
29
"testing"
31
30
"time"
32
31
32
+ "github.com/hyperledger/firefly/internal/metrics"
33
+
33
34
"github.com/hyperledger/firefly/mocks/metricsmocks"
34
35
35
36
"github.com/hyperledger/firefly-common/pkg/config"
@@ -780,6 +781,12 @@ func TestEventsWithManifest(t *testing.T) {
780
781
h , toServer , fromServer , _ , done := newTestFFDX (t , true )
781
782
defer done ()
782
783
784
+ mcb := & dataexchangemocks.Callbacks {}
785
+ mcb .On ("DXConnect" , h ).Return (nil )
786
+ h .SetHandler ("ns1" , "node1" , mcb )
787
+ ocb := & coremocks.OperationCallbacks {}
788
+ h .SetOperationHandler ("ns1" , ocb )
789
+
783
790
err := h .Start ()
784
791
assert .NoError (t , err )
785
792
@@ -788,11 +795,6 @@ func TestEventsWithManifest(t *testing.T) {
788
795
msg := <- toServer
789
796
assert .Equal (t , `{"action":"ack","id":"0"}` , string (msg ))
790
797
791
- mcb := & dataexchangemocks.Callbacks {}
792
- h .SetHandler ("ns1" , "node1" , mcb )
793
- ocb := & coremocks.OperationCallbacks {}
794
- h .SetOperationHandler ("ns1" , ocb )
795
-
796
798
namespacedID1 := fmt .Sprintf ("ns1:%s" , fftypes .NewUUID ())
797
799
ocb .On ("OperationUpdate" , mock .MatchedBy (func (ev * core.OperationUpdateAsync ) bool {
798
800
return ev .NamespacedOpID == namespacedID1 &&
0 commit comments