Review Request 108380: Fix race condition in KTcpSocketTest
David Faure
faure at kde.org
Sun Jan 13 10:58:19 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108380/#review25346
-----------------------------------------------------------
Woohoo, it's Christmas again :) This flaky test was bothering me very much, given our current goal of all-tests-passing.
( Almost there btw -- http://build.kde.org/job/kdelibs_frameworks_qt5/lastBuild/ )
kdecore/tests/ktcpsockettest.cpp
<http://git.reviewboard.kde.org/r/108380/#comment19345>
The 1111 relies on the current content of the page being fetched? :-)
If hardcoding the data size in the test can't be avoided, maybe we should upload a test file on a kde server instead of relying on www.iana.org's front page...
kdecore/tests/ktcpsockettest.cpp
<http://git.reviewboard.kde.org/r/108380/#comment19344>
I'm not sure why the test was making the HTTP Request twice (Andreas?), but this is changing what's actually being tested, a little bit, I think?
- David Faure
On Jan. 13, 2013, 9:28 a.m., Jon Severinsson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108380/
> -----------------------------------------------------------
>
> (Updated Jan. 13, 2013, 9:28 a.m.)
>
>
> Review request for KDE Frameworks and kdelibs.
>
>
> Description
> -------
>
> In some cases, only part of the first response had arrived when the second
> s->write(HTTPREQUEST) was executed. Thus the second s->waitForReadyRead()
> would return when the rest of the first response arrived, which in some
> cases would be before the second request had left the write buffer
> That in turn meant that s->close() would be run with a non-empty write
> buffer, thus only putting the socket in ClosingState rather than
> UnconnectedState as the test expected.
>
> Only tested on the frameworks branch, but it might be applicable to master as well.
>
>
> Diffs
> -----
>
> kdecore/tests/ktcpsockettest.cpp bfc4212
>
> Diff: http://git.reviewboard.kde.org/r/108380/diff/
>
>
> Testing
> -------
>
> Run the test 100 times in a loop without any failures.
>
>
> Thanks,
>
> Jon Severinsson
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130113/232d7c89/attachment.html>
More information about the Kde-frameworks-devel
mailing list