diff --git a/core/service.go b/core/service.go index 9ed84531..f659b9f6 100644 --- a/core/service.go +++ b/core/service.go @@ -164,7 +164,7 @@ func (srv *RelayService) Serve(ctx context.Context) error { } func (srv *RelayService) shouldExecuteRelay(seqs *RelayPackets) (bool, bool) { - + logger := GetChannelPairLogger(srv.src, srv.dst) var err error srcRelay := false @@ -206,5 +206,7 @@ func (srv *RelayService) shouldExecuteRelay(seqs *RelayPackets) (bool, bool) { dstRelay = true } + logger.Info("shouldExecuteRelay", "srcRelay", srcRelay, "dstRelay", dstRelay) + return srcRelay, dstRelay } diff --git a/tests/cases/tm2tm/scripts/test-service b/tests/cases/tm2tm/scripts/test-service index 9d57e124..798865f6 100755 --- a/tests/cases/tm2tm/scripts/test-service +++ b/tests/cases/tm2tm/scripts/test-service @@ -85,7 +85,7 @@ sleep 4 expectUnrelayedCount "unrelayed-packets" "src" 0 expectUnrelayedCount "unrelayed-acknowledgements" "dst" 5 -sleep 16 +sleep 20 echo "xxxxxxx ${SECONDS} relay service [acks = 5, time = 40] -> exec (time + count) xxxxxx" sleep 4 @@ -94,4 +94,5 @@ expectUnrelayedCount "unrelayed-packets" "src" 0 expectUnrelayedCount "unrelayed-acknowledgements" "dst" 0 echo "Finished" + kill $RLY_PID diff --git a/tests/cases/tmmock2tmmock/scripts/test-service b/tests/cases/tmmock2tmmock/scripts/test-service index 9d534dcf..0fe475a2 100755 --- a/tests/cases/tmmock2tmmock/scripts/test-service +++ b/tests/cases/tmmock2tmmock/scripts/test-service @@ -90,7 +90,7 @@ sleep 4 expectUnrelayedCount "unrelayed-packets" "src" 0 expectUnrelayedCount "unrelayed-acknowledgements" "dst" 5 -sleep 16 +sleep 20 echo "xxxxxxx ${SECONDS} relay service [akcs = 3, time = 40] -> exec - time + count xxxxxx" sleep 4