From a cursory glance, the code expects that “space-0” exists and because you can only have one space at a time, without specifying the space, the test correctly fails because we have two spaces.
So the problem seems to be that there is either a concurrent test happening, or there is a dangling not cleaned up test.