Commit 5a98f116 authored by Greg Williams's avatar Greg Williams
Browse files

Re-added sleep(2) and read pipe flush to TearDown in test_kinetic_socket,...

Re-added sleep(2) and read pipe flush to TearDown in test_kinetic_socket, since Linux appears to need extra time for cleanup of client/server sessions
parent a31a23b5
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ void tearDown(void)
        LOG("Shutting down socket...");
        KineticSocket_Close(FileDesc);
        FileDesc = 0;
        sleep(2);
    }
}

@@ -97,8 +98,8 @@ void test_KineticSocket_Write_should_write_the_data_to_the_specified_socket(void
    success = KineticSocket_Write(FileDesc, TestData, strlen(TestData));
    TEST_ASSERT_TRUE_MESSAGE(success, "Failed to write to socket!");

    // LOG("Flushing socket read pipe...");
    // KineticSocket_Read(FileDesc, data, sizeof(data));
    LOG("Flushing socket read pipe...");
    KineticSocket_Read(FileDesc, data, sizeof(data));
}

void test_KineticSocket_WriteProtobuf_should_write_serialized_protobuf_to_the_specified_socket(void)
@@ -120,8 +121,8 @@ void test_KineticSocket_WriteProtobuf_should_write_serialized_protobuf_to_the_sp
    success = KineticSocket_WriteProtobuf(FileDesc, &Msg.proto);
    TEST_ASSERT_TRUE_MESSAGE(success, "Failed to write to socket!");

    // LOG("Flushing socket read pipe...");
    // KineticSocket_Read(FileDesc, data, sizeof(data));
    LOG("Flushing socket read pipe...");
    KineticSocket_Read(FileDesc, data, sizeof(data));
}

void test_KineticSocket_Read_should_read_data_from_the_specified_socket(void)