add lock to test id counting from len on tests