So, I've been refactoring my videoconferencing application for a while, covering it with unit and general tests. Finally, I got to the point where I need to write a loopback test with 1 client sending video stream over to another client. This is not supposed to run as one process, even on the same machine. Nevertheless, I need to write this test to ensure that all separate components are working properly together. However, once I put this all together, I start to notice how some parts, previously covered with unit-tests, start to behave slightly differently - basically, deadlines are missed and real-time requirements are violated. I tend to believe, that this is happening due to the fact, that code for two clients runs slower in one executable, as opposed to the case if the two clients were on separate machines (as it would be in real-life scenario).
So, how one should design tests for such a software and account for these constraints? Asking for best practices here.