Fix windows build. Test-connection-fails still fails.
This commit is contained in:
parent
111536c9e5
commit
2f1150e680
@ -135,6 +135,8 @@
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="test\benchmark-ping-pongs.c" />
|
||||
<ClCompile Include="test\echo-server.c" />
|
||||
<ClCompile Include="test\run-benchmarks.c" />
|
||||
<ClCompile Include="test\runner-win.c" />
|
||||
<ClCompile Include="test\runner.c" />
|
||||
|
||||
@ -138,6 +138,7 @@
|
||||
<ItemGroup>
|
||||
<ClCompile Include="test\echo-server.c" />
|
||||
<ClCompile Include="test\test-callback-stack.c" />
|
||||
<ClCompile Include="test\test-connection-fail.c" />
|
||||
<ClCompile Include="test\test-fail-always.c" />
|
||||
<ClCompile Include="test\test-pass-always.c" />
|
||||
<ClCompile Include="test\test-ping-pong.c" />
|
||||
|
||||
@ -45,15 +45,18 @@ static void on_connect(oio_req *req, int err) {
|
||||
|
||||
|
||||
TEST_IMPL(test_connection_fail) {
|
||||
struct sockaddr_in client_addr, server_addr;
|
||||
int r;
|
||||
|
||||
oio_init();
|
||||
|
||||
struct sockaddr_in client_addr = oio_ip4_addr("0.0.0.0", 0);
|
||||
|
||||
client_addr = oio_ip4_addr("0.0.0.0", 0);
|
||||
|
||||
/* There should be no servers listening on this port. */
|
||||
struct sockaddr_in server_addr = oio_ip4_addr("127.0.0.1", TEST_PORT);
|
||||
server_addr = oio_ip4_addr("127.0.0.1", TEST_PORT);
|
||||
|
||||
/* Try to connec to the server and do NUM_PINGS ping-pongs. */
|
||||
int r = oio_tcp_init(&handle, on_close, NULL);
|
||||
r = oio_tcp_init(&handle, on_close, NULL);
|
||||
ASSERT(!r);
|
||||
|
||||
/* We are never doing multiple reads/connects at a time anyway. */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user