fix server_test data race bug