Bug 32085 - Write tests for StreamedMedia
Summary: Write tests for StreamedMedia
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: rakia (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: David Laban
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/al...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks: 32189
  Show dependency treegraph
 
Reported: 2010-12-03 11:30 UTC by David Laban
Modified: 2011-02-03 22:47 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Laban 2010-12-03 11:30:53 UTC
I'd quite like to port telepathy-sofiasip to Call at some point, and I don't want to break StreamedMedia while I'm at it.

I'm writing tests by copy-pasting from gabble's jingle tests, and then changing the network level events.

Status as of 2010-12-03 is that I get all of the dbus traffic correct as far as the first network event, but only for the CreateChannel({TargetHandleType: Contact, TargetHandle: h}); RequestStreams() case.

Next week, I will look at the following cases:
REQUEST_ANONYMOUS = 1 # RequestChannel(HandleTypeNone, 0); RequestStreams()
REQUEST_ANONYMOUS_AND_ADD = 2 # RequestChannel(HandleTypeNone, 0);
                              # AddMembers([h], ...); RequestStreams(h,...)
REQUEST_NONYMOUS = 3 # RequestChannel(HandleTypeContact, h);
                     # RequestStreams(h, ...)

as far as I can be bothered to get, and then check that the network traffic is all correct.
Comment 1 David Laban 2010-12-07 11:55:09 UTC
I think I need someone to take a look at the group flags for me. Currently, I'm pretty sure nobody cares about group flags, so I've commented out some lines in the tests until someone can be bothered to fix them (32189)

I think I'm pretty happy with the state of my streamedmedia_tests branch, and am going to stop rebasing it now if someone wants to review it.

David.
Comment 2 Will Thompson 2011-01-13 09:06:24 UTC
This looks good to me. I'm gonna have to trust you on the SIP headers sent by voip_test. I only have a few minor style points. I'm not hung up on them though.

In “Update the groups interface when remote user accepts the call.”:

+          TpIntSet *set;
+
+          set = tp_intset_new ();
+          tp_intset_add (set, peer);

I guess I'd spell this as TpIntSet *set = tp_intset_new_containing (peer);.

+        elif message.method == 'OPTIONS':
+            # FIXME: work out why sofiasip keeps sending s:REGISTRATION PROBE
+            return

Is there a bug for this?

+            assert self._aline_template % locals() in sdp_string

How about assertContains?
Comment 3 Mikhail Zabaluev 2011-01-14 12:52:08 UTC
(In reply to comment #2)
> +        elif message.method == 'OPTIONS':
> +            # FIXME: work out why sofiasip keeps sending s:REGISTRATION PROBE
> +            return
> 
> Is there a bug for this?

It's a feature :) It's sent once right after registration if outbound flow management is enabled, to verify something NAT-related about our connection with a harmless roundtrip. I wasn't around when this was introduced, and never cared to learn its exact purpose.
Comment 4 David Laban 2011-01-14 19:01:11 UTC
I think I might as well reply to it to make the tests cleaner before I merge this branch. Don't worry: it won't take long.
Comment 5 David Laban 2011-01-26 09:33:20 UTC
Okay: just pushed some fixes, and also fixed #32189 as the last commit.

Decided to do a bit of variable renaming while I was porting to tp_intset_new_containing(). Hope you don't mind.
Comment 6 Will Thompson 2011-01-31 10:18:43 UTC
ship it!
Comment 7 David Laban 2011-02-03 11:10:41 UTC
Merged to master.
Comment 8 Pekka Pessi 2011-02-03 22:47:36 UTC
Clones seem to grow warts.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.