=== Test case: presence_SUITE:subscribe/1 (click for source code)

=== Config value:

    [{watchdog,<0.5638.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/presence_SUITE_data"},
     {preset,"ldap_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@12130b74fc81.2022-03-03_10.28.39/big_tests.tests.presence_SUITE.logs/run.2022-03-03_10.36.28/presence_suite.subscribe.38403.html"},
     {tc_group_properties,[{name,subscribe_group},
                           {repeat_until_all_ok,3},
                           parallel]},
     {tc_group_path,[]},
     {data_dir,"/home/circleci/project/big_tests/_build/default/lib/mongoose_tests/ebin/presence_SUITE_data/"},
     {priv_dir,"/home/circleci/project/big_tests/ct_report/ct_run.test@12130b74fc81.2022-03-03_10.28.39/big_tests.tests.presence_SUITE.logs/run.2022-03-03_10.36.28/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"localhost">>},
                           {password,<<"makrolika">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@12130b74fc81.2022-03-03_10.28.39"

=== Started at 2022-03-03 10:36:30


*** CT 2022-03-03 10:36:30.065 *** View log from node mongooseim@localhost when started mongooseim@localhost_4522.html
*** CT 2022-03-03 10:36:30.065 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_2342.html

*** User 2022-03-03 10:36:30.076 ***
alicE_subscribe_1000@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-03 10:36:30.076 ***
alicE_subscribe_1000@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6997a050ff089f59' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:36:30.077 ***
alicE_subscribe_1000@localhost/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-03-03 10:36:30.077 ***
alicE_subscribe_1000@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3N1YnNjcmliZV8xMDAwAG1hdHlncnlzYQ==</auth>



*** User 2022-03-03 10:36:30.078 ***
alicE_subscribe_1000@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-03 10:36:30.078 ***
alicE_subscribe_1000@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-03 10:36:30.078 ***
alicE_subscribe_1000@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='e367b3fcad583ce8' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:36:30.078 ***
alicE_subscribe_1000@localhost/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-03-03 10:36:30.078 ***
alicE_subscribe_1000@localhost/res1 out
<iq type='set' id='e24e5025288d55a8b841227b2572bdf9'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-03 10:36:30.078 ***
alicE_subscribe_1000@localhost/res1 in
<iq id='e24e5025288d55a8b841227b2572bdf9' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alicE_subscribe_1000@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-03 10:36:30.079 ***
alicE_subscribe_1000@localhost/res1 out
<iq type='set' id='d87c33b57ab0962e4a9935110ca61db5'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:36:30.079 ***
alicE_subscribe_1000@localhost/res1 in
<iq type='result' id='d87c33b57ab0962e4a9935110ca61db5'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:36:30.079 ***
alicE_subscribe_1000@localhost/res1 out
<presence/>



*** User 2022-03-03 10:36:30.080 ***
alicE_subscribe_1000@localhost/res1 in
<presence from='alicE_subscribe_1000@localhost/res1' to='alice_subscribe_1000@localhost/res1' xml:lang='en'/>



*** User 2022-03-03 10:36:30.080 ***
bOb_subscribe_1000@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-03 10:36:30.080 ***
bOb_subscribe_1000@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7953f075783b60b3' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:36:30.081 ***
bOb_subscribe_1000@localhost/res1 in
<stream:features>
	<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
		<mechanism>PLAIN</mechanism>
	</mechanisms>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-03-03 10:36:30.081 ***
bOb_subscribe_1000@localhost/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zdWJzY3JpYmVfMTAwMABtYWtyb2xpa2E=</auth>



*** User 2022-03-03 10:36:30.082 ***
bOb_subscribe_1000@localhost/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-03-03 10:36:30.082 ***
bOb_subscribe_1000@localhost/res1 out
<stream:stream to='localhost' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-03-03 10:36:30.082 ***
bOb_subscribe_1000@localhost/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='a85b1ce40db97302' from='localhost' version='1.0' xml:lang='en'>

*** User 2022-03-03 10:36:30.082 ***
bOb_subscribe_1000@localhost/res1 in
<stream:features>
	<compression xmlns='http://jabber.org/features/compress'>
		<method>zlib</method>
	</compression>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
	<register xmlns='http://jabber.org/features/iq-register'/>
	<amp xmlns='http://jabber.org/feature/amp'/>
	<sm xmlns='urn:xmpp:sm:3'/>
</stream:features>



*** User 2022-03-03 10:36:30.082 ***
bOb_subscribe_1000@localhost/res1 out
<iq type='set' id='ccc73f332eabe242f05c8753090bee7f'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-03-03 10:36:30.082 ***
bOb_subscribe_1000@localhost/res1 in
<iq id='ccc73f332eabe242f05c8753090bee7f' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bOb_subscribe_1000@localhost/res1</jid>
	</bind>
</iq>



*** User 2022-03-03 10:36:30.082 ***
bOb_subscribe_1000@localhost/res1 out
<iq type='set' id='48d2ba9a537612631520cb44f2c9501c'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:36:30.083 ***
bOb_subscribe_1000@localhost/res1 in
<iq type='result' id='48d2ba9a537612631520cb44f2c9501c'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-03-03 10:36:30.083 ***
bOb_subscribe_1000@localhost/res1 out
<presence/>



*** User 2022-03-03 10:36:30.084 ***
bOb_subscribe_1000@localhost/res1 in
<presence from='bOb_subscribe_1000@localhost/res1' to='bob_subscribe_1000@localhost/res1' xml:lang='en'/>



*** User 2022-03-03 10:36:30.084 ***
alicE_subscribe_1000@localhost/res1 out
<iq type='set' id='f3bb09033be12f122c4808de3ac9f84b'>
	<query xmlns='jabber:iq:roster'>
		<item jid='bOb_subscribe_1000@localhost' name='Bobby'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-03-03 10:36:30.084 ***
alicE_subscribe_1000@localhost/res1 in
<iq from='alicE_subscribe_1000@localhost' to='alicE_subscribe_1000@localhost/res1' id='push470ed49c74fb3430' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' name='Bobby' jid='bob_subscribe_1000@localhost'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-03-03 10:36:30.085 ***
alicE_subscribe_1000@localhost/res1 in
<iq from='alicE_subscribe_1000@localhost' to='alicE_subscribe_1000@localhost/res1' id='f3bb09033be12f122c4808de3ac9f84b' type='result'/>



*** User 2022-03-03 10:36:30.085 ***
alicE_subscribe_1000@localhost/res1 out
<iq to='alicE_subscribe_1000@localhost' id='push470ed49c74fb3430' type='result'/>



*** User 2022-03-03 10:36:30.085 ***
alicE_subscribe_1000@localhost/res1 out
<presence type='subscribe' to='bOb_subscribe_1000@localhost'/>



*** User 2022-03-03 10:36:30.086 ***
alicE_subscribe_1000@localhost/res1 in
<iq from='alicE_subscribe_1000@localhost' to='alicE_subscribe_1000@localhost/res1' id='push4fb892f4132a503e' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item ask='subscribe' subscription='none' name='Bobby' jid='bob_subscribe_1000@localhost'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-03-03 10:36:30.086 ***
alicE_subscribe_1000@localhost/res1 out
<iq to='alicE_subscribe_1000@localhost' id='push4fb892f4132a503e' type='result'/>



*** User 2022-03-03 10:36:30.087 ***
bOb_subscribe_1000@localhost/res1 in
<presence from='alicE_subscribe_1000@localhost' to='bOb_subscribe_1000@localhost/res1' xml:lang='en' type='subscribe'/>



*** User 2022-03-03 10:36:30.087 ***
bOb_subscribe_1000@localhost/res1 out
<iq type='get' id='e4567d2b66f45c4e5afd65c0b2bbd781'>
	<query xmlns='jabber:iq:roster'/>
</iq>



*** User 2022-03-03 10:36:30.087 ***
bOb_subscribe_1000@localhost/res1 in
<iq from='bOb_subscribe_1000@localhost' to='bOb_subscribe_1000@localhost/res1' id='e4567d2b66f45c4e5afd65c0b2bbd781' type='result'>
	<query xmlns='jabber:iq:roster'/>
</iq>



*** User 2022-03-03 10:36:30.087 ***
Roster: {xmlel,<<"iq">>,
               [{<<"from">>,<<"bOb_subscribe_1000@localhost">>},
                {<<"to">>,<<"bOb_subscribe_1000@localhost/res1">>},
                {<<"id">>,<<"e4567d2b66f45c4e5afd65c0b2bbd781">>},
                {<<"type">>,<<"result">>}],
               [{xmlel,<<"query">>,
                       [{<<"xmlns">>,<<"jabber:iq:roster">>}],
                       []}]}

*** User 2022-03-03 10:36:30.087 ***
bOb_subscribe_1000@localhost/res1 out
<iq type='set' id='4fa11213d8f4924c7b8aa994668d8aa3'>
	<query xmlns='jabber:iq:roster'>
		<item jid='alicE_subscribe_1000@localhost' name='Alice'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-03-03 10:36:30.089 ***
bOb_subscribe_1000@localhost/res1 in
<iq from='bOb_subscribe_1000@localhost' to='bOb_subscribe_1000@localhost/res1' id='push145633ac73d3ef67' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' name='Alice' jid='alice_subscribe_1000@localhost'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-03-03 10:36:30.089 ***
bOb_subscribe_1000@localhost/res1 out
<iq to='bOb_subscribe_1000@localhost' id='push145633ac73d3ef67' type='result'/>



*** User 2022-03-03 10:36:30.089 ***
bOb_subscribe_1000@localhost/res1 in
<iq from='bOb_subscribe_1000@localhost' to='bOb_subscribe_1000@localhost/res1' id='4fa11213d8f4924c7b8aa994668d8aa3' type='result'/>



*** User 2022-03-03 10:36:30.089 ***
bOb_subscribe_1000@localhost/res1 out
<presence type='subscribed' to='alicE_subscribe_1000@localhost'/>



*** User 2022-03-03 10:36:30.090 ***
alicE_subscribe_1000@localhost/res1 in
<iq from='alicE_subscribe_1000@localhost' to='alicE_subscribe_1000@localhost/res1' id='push0e8d2137ec2d9123' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='to' name='Bobby' jid='bob_subscribe_1000@localhost'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-03-03 10:36:30.090 ***
alicE_subscribe_1000@localhost/res1 in
<presence from='bOb_subscribe_1000@localhost' to='alicE_subscribe_1000@localhost/res1' xml:lang='en' type='subscribed'/>



*** User 2022-03-03 10:36:30.091 ***
alicE_subscribe_1000@localhost/res1 in
<presence from='bOb_subscribe_1000@localhost/res1' to='alice_subscribe_1000@localhost/res1' xml:lang='en'/>



*** User 2022-03-03 10:36:30.091 ***
bOb_subscribe_1000@localhost/res1 in
<iq from='bOb_subscribe_1000@localhost' to='bOb_subscribe_1000@localhost/res1' id='push8fb08533daaeb35b' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' name='Alice' jid='alice_subscribe_1000@localhost'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-03-03 10:36:30.091 ***
bOb_subscribe_1000@localhost/res1 out
<iq type='get' id='5fe841cedcf4d7103277896e463eacc1'>
	<query xmlns='jabber:iq:roster'/>
</iq>



*** User 2022-03-03 10:36:30.092 ***
bOb_subscribe_1000@localhost/res1 in
<iq from='bOb_subscribe_1000@localhost' to='bOb_subscribe_1000@localhost/res1' id='5fe841cedcf4d7103277896e463eacc1' type='result'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' name='Alice' jid='alice_subscribe_1000@localhost'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-03-03 10:36:30.092 ***
Roster: {xmlel,<<"iq">>,
            [{<<"from">>,<<"bOb_subscribe_1000@localhost">>},
             {<<"to">>,<<"bOb_subscribe_1000@localhost/res1">>},
             {<<"id">>,<<"5fe841cedcf4d7103277896e463eacc1">>},
             {<<"type">>,<<"result">>}],
            [{xmlel,<<"query">>,
                 [{<<"xmlns">>,<<"jabber:iq:roster">>}],
                 [{xmlel,<<"item">>,
                      [{<<"subscription">>,<<"from">>},
                       {<<"name">>,<<"Alice">>},
                       {<<"jid">>,<<"alice_subscribe_1000@localhost">>}],
                      [{xmlel,<<"group">>,[],[{xmlcdata,<<"enemies">>}]}]}]}]}

*** User 2022-03-03 10:36:30.092 ***
bOb_subscribe_1000@localhost/res1 out
<presence/>



*** User 2022-03-03 10:36:30.092 ***
alicE_subscribe_1000@localhost/res1 in
<presence from='bOb_subscribe_1000@localhost/res1' to='alice_subscribe_1000@localhost/res1' xml:lang='en'/>



*** User 2022-03-03 10:36:30.092 ***
bOb_subscribe_1000@localhost/res1 out
<presence type='unavailable'/>



*** User 2022-03-03 10:36:30.093 ***
alicE_subscribe_1000@localhost/res1 in
<presence from='bOb_subscribe_1000@localhost/res1' to='alice_subscribe_1000@localhost/res1' xml:lang='en' type='unavailable'/>



*** User 2022-03-03 10:36:30.093 ***
bOb_subscribe_1000@localhost/res1 out
</stream:stream>

*** User 2022-03-03 10:36:30.093 ***
bOb_subscribe_1000@localhost/res1 in
</stream:stream>

*** User 2022-03-03 10:36:30.093 ***
alicE_subscribe_1000@localhost/res1 out
</stream:stream>

*** User 2022-03-03 10:36:30.093 ***
alicE_subscribe_1000@localhost/res1 in
</stream:stream>
*** CT 2022-03-03 10:36:30.101 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_2342.html
*** CT 2022-03-03 10:36:30.101 *** View log from node mongooseim@localhost when finished mongooseim@localhost_4522.html



=== Ended at 2022-03-03 10:36:30
=== successfully completed test case
=== === Returned value: ok