def talker_existing_connect_seq(test_step, user, src, src_stream, dst, dst_stream): stream_id = endpoints.stream_from_guid(endpoints.guid_in_ascii(user, endpoints.get(src))) listener_mac = endpoints.mac_in_ascii(user, endpoints.get(dst)) talker_connection = [ Sequence([Expected(src, "CONNECTING Talker stream #%d \(%s\) -> Listener %s" % (src_stream, stream_id, listener_mac), 10)]) ] return talker_connection
def talker_new_connect_seq(test_step, user, src, src_stream, dst, dst_stream): """ Only on the first time the talker is turned on must the 'ready' be seen. """ stream_id = endpoints.stream_from_guid(endpoints.guid_in_ascii(user, endpoints.get(src))) listener_mac = endpoints.mac_in_ascii(user, endpoints.get(dst)) seq = [Expected(src, "CONNECTING Talker stream #%d \(%s\) -> Listener %s" % (src_stream, stream_id, listener_mac), 10)] if not state.get_current().get_talker_on_count(src): seq += [Expected(src, "Talker stream #%d ready" % src_stream, 10)] seq += [Expected(src, "Talker stream #%d on" % src_stream, 10)] talker_connection = [Sequence(seq)] return talker_connection
def talker_new_connect_seq(test_step, user, src, src_stream, dst, dst_stream): """ Only on the first time the talker is turned on must the 'ready' be seen. """ stream_id = endpoints.stream_from_guid(endpoints.guid_in_ascii(user, endpoints.get(src))) listener_mac = endpoints.mac_in_ascii(user, endpoints.get(dst)) seq = [Expected(src, "CONNECTING Talker stream #%d \(%s\) -> Listener %s" % (src_stream, stream_id, listener_mac), 10)] if not state.get_current().get_talker_on_count(src): seq += [Expected(src, "Talker stream #%d ready" % src_stream, 10)] seq += [Expected(src, "Talker stream #%d on" % src_stream, 10)] # If in a sequence of commands then the order cannot be guaranteed - so only # expect a Sequence when not checkpointing if test_step.checkpoint is None: talker_connection = [Sequence(seq)] else: talker_connection = [AllOf(seq)] return talker_connection