http://bugzilla.moblin.org/show_bug.cgi?id=3427
--- Comment #13 from pohly <patrick.ohly(a)intel.com> 2009-07-21 04:04:45 ---
(In reply to comment #12)
(In reply to comment #11)
> We need to cover two error scenarios:
> * message reached the server, only its reply is lost =>
> server must handle duplicate messages
> * message never reached the server
>
> Can't we test this with intercepting messages, like we do for the interrupt
> tests?
It's not easy to drop reply at client side; for the real case the reply is
never received so the client is blocking; it can not be emulated by getting the
reply and ignoring it(the client will not block).
True, at the lowest network level the simulation will differ from the proxy
solution. But I think we can ignore this particular aspect by assuming that our
transport libraries (libcurl, libsoup) will not get blocked in a real error
case and thus our higher-level timeout code is invoked. For libsoup this is
guaranteed by the design of the transport (glib event loop), for libcurl we
have the 1 minute idle call.
Then for the higher levels a dropped message or reply can be simulated:
- the wrapper's wait() call always returns ACTIVE even if the underlying
transport signals GOT_REPLY
- the wrapper must simulate the idle callback when the underlying
transport has completed already
Duplicate requests in different sessions should have already been
covered by
existing interrupt tests; but not duplicate request in the same session. This
can be added of course.
This is the key difference between the interrupt/resume tests and this issue:
if resending works, the current session is never interrupted. This might work
with more servers, because as Lukas said, Nokia phones have already used
aggressive resending for a while.
I think the message should have reached the server in this case, if
the request
sending is not successful, the transport should complain (TCP should work
here), right?
Right. So we only need to cover the "message sent successfully, reply lost"
case.
--
Configure bugmail:
http://bugzilla.moblin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching someone on the CC list of the bug.