aboutsummaryrefslogtreecommitdiffhomepage
path: root/container/dispatcher_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'container/dispatcher_test.go')
-rw-r--r--container/dispatcher_test.go13
1 files changed, 10 insertions, 3 deletions
diff --git a/container/dispatcher_test.go b/container/dispatcher_test.go
index b57c53b9..c8a7b492 100644
--- a/container/dispatcher_test.go
+++ b/container/dispatcher_test.go
@@ -390,7 +390,7 @@ func (k *kstub) isatty(fd int) bool {
return expect.Ret.(bool)
}
-func (k *kstub) receive(key string, e any, fdp *uintptr) (closeFunc func() error, err error) {
+func (k *kstub) receive(key string, e any, fdp *int) (closeFunc func() error, err error) {
k.Helper()
expect := k.Expects("receive")
@@ -408,10 +408,17 @@ func (k *kstub) receive(key string, e any, fdp *uintptr) (closeFunc func() error
}
return nil
}
+
+ // avoid changing test cases
+ var fdpComp *uintptr
+ if fdp != nil {
+ fdpComp = new(uintptr(*fdp))
+ }
+
err = expect.Error(
stub.CheckArg(k.Stub, "key", key, 0),
stub.CheckArgReflect(k.Stub, "e", e, 1),
- stub.CheckArgReflect(k.Stub, "fdp", fdp, 2))
+ stub.CheckArgReflect(k.Stub, "fdp", fdpComp, 2))
// 3 is unused so stores params
if expect.Args[3] != nil {
@@ -426,7 +433,7 @@ func (k *kstub) receive(key string, e any, fdp *uintptr) (closeFunc func() error
if expect.Args[4] != nil {
if v, ok := expect.Args[4].(uintptr); ok && v >= 3 {
if fdp != nil {
- *fdp = v
+ *fdp = int(v)
}
}
}