Fix connection test.
Fix most integration tests.