test: fixed failing debug-port tests

This commit should be merged with b317976.