Simplified socket test setup logic