--- ./tests/test-mongoc-topology-scanner.c.topology-scanner	2018-04-09 21:26:08 +0200
+++ ./tests/test-mongoc-topology-scanner.c	2018-04-24 15:23:47 +0200
@@ -297,10 +297,15 @@
    ASSERT (!mongoc_client_command_simple (
       client, "db", tmp_bson ("{'foo': 1}"), NULL, NULL, &error));
 
+#ifdef _AIX
+#define ERROR_MESSAGE "Failed to write rpc bytes. calling ismaster on "
+#else
+#define ERROR_MESSAGE "connection refused calling ismaster on "
+#endif
    ASSERT_ERROR_CONTAINS (error,
                           MONGOC_ERROR_SERVER_SELECTION,
                           MONGOC_ERROR_SERVER_SELECTION_FAILURE,
-                          "connection refused calling ismaster on "
+			  ERROR_MESSAGE
                           "'localhost:9876'");
 
    mongoc_client_destroy (client);
