add mock flag to worker to prevent looping indefinitely if its only a test connection, and fix testBase