agent: Fixing port collision in tests