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

=== Config value:

    [{watchdog,<0.30709.1>},
     {mim_data_dir,"/home/circleci/project/big_tests/tests/presence_SUITE_data"},
     {preset,"odbc_mssql_mnesia"},
     {tc_logfile,"/home/circleci/project/big_tests/ct_report/ct_run.test@f0b09cc3aef4.2022-05-25_09.03.38/big_tests.tests.presence_SUITE.logs/run.2022-05-25_09.13.01/presence_suite.subscribe.44805.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@f0b09cc3aef4.2022-05-25_09.03.38/big_tests.tests.presence_SUITE.logs/run.2022-05-25_09.13.01/log_private/"},
     {escalus_users,[{alice,[{username,<<"alicE">>},
                             {server,<<"domain.example.com">>},
                             {host,<<"localhost">>},
                             {password,<<"matygrysa">>}]},
                     {bob,[{username,<<"bOb">>},
                           {server,<<"domain.example.com">>},
                           {host,<<"localhost">>},
                           {password,<<"makrolika">>}]}]}]

=== Current directory is "/home/circleci/project/big_tests/ct_report/ct_run.test@f0b09cc3aef4.2022-05-25_09.03.38"

=== Started at 2022-05-25 09:13:03


*** CT 2022-05-25 09:13:03.386 *** View log from node mongooseim@localhost when started mongooseim@localhost_2328.html
*** CT 2022-05-25 09:13:03.387 *** View log from node ejabberd2@localhost when started ejabberd2@localhost_520.html

*** User 2022-05-25 09:13:03.402 ***
alicE_subscribe_1979@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-25 09:13:03.402 ***
alicE_subscribe_1979@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='aa4d7985e173e261' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-25 09:13:03.402 ***
alicE_subscribe_1979@domain.example.com/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>SCRAM-SHA-256</mechanism>
		<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-05-25 09:13:03.402 ***
alicE_subscribe_1979@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFsaWNFX3N1YnNjcmliZV8xOTc5AG1hdHlncnlzYQ==</auth>



*** User 2022-05-25 09:13:03.403 ***
alicE_subscribe_1979@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-25 09:13:03.403 ***
alicE_subscribe_1979@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-25 09:13:03.403 ***
alicE_subscribe_1979@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='9093511d891d5400' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-25 09:13:03.403 ***
alicE_subscribe_1979@domain.example.com/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-05-25 09:13:03.403 ***
alicE_subscribe_1979@domain.example.com/res1 out
<iq type='set' id='d88672023e691bbd5237b5d124ebd0d6'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-25 09:13:03.403 ***
alicE_subscribe_1979@domain.example.com/res1 in
<iq id='d88672023e691bbd5237b5d124ebd0d6' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>alice_subscribe_1979@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-05-25 09:13:03.404 ***
alice_subscribe_1979@domain.example.com/res1 out
<iq type='set' id='2b0d172359452f879396858cd010986d'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 09:13:03.404 ***
alice_subscribe_1979@domain.example.com/res1 in
<iq type='result' id='2b0d172359452f879396858cd010986d'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 09:13:03.404 ***
alice_subscribe_1979@domain.example.com/res1 out
<presence/>



*** User 2022-05-25 09:13:03.405 ***
alice_subscribe_1979@domain.example.com/res1 in
<presence from='alice_subscribe_1979@domain.example.com/res1' to='alice_subscribe_1979@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-25 09:13:03.406 ***
bOb_subscribe_1979@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-25 09:13:03.406 ***
bOb_subscribe_1979@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='6e8bfd419adccd2a' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-25 09:13:03.406 ***
bOb_subscribe_1979@domain.example.com/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>SCRAM-SHA-256</mechanism>
		<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-05-25 09:13:03.406 ***
bOb_subscribe_1979@domain.example.com/res1 out
<auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGJPYl9zdWJzY3JpYmVfMTk3OQBtYWtyb2xpa2E=</auth>



*** User 2022-05-25 09:13:03.407 ***
bOb_subscribe_1979@domain.example.com/res1 in
<success xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/>



*** User 2022-05-25 09:13:03.407 ***
bOb_subscribe_1979@domain.example.com/res1 out
<stream:stream to='domain.example.com' version='1.0' xml:lang='en' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

*** User 2022-05-25 09:13:03.407 ***
bOb_subscribe_1979@domain.example.com/res1 in
<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='12f5c8a3644aed56' from='domain.example.com' version='1.0' xml:lang='en'>

*** User 2022-05-25 09:13:03.407 ***
bOb_subscribe_1979@domain.example.com/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-05-25 09:13:03.407 ***
bOb_subscribe_1979@domain.example.com/res1 out
<iq type='set' id='4bba9585cdbc21b77a0941b659fb68e8'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<resource>res1</resource>
	</bind>
</iq>



*** User 2022-05-25 09:13:03.408 ***
bOb_subscribe_1979@domain.example.com/res1 in
<iq id='4bba9585cdbc21b77a0941b659fb68e8' type='result'>
	<bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'>
		<jid>bob_subscribe_1979@domain.example.com/res1</jid>
	</bind>
</iq>



*** User 2022-05-25 09:13:03.408 ***
bob_subscribe_1979@domain.example.com/res1 out
<iq type='set' id='7c5f1ae8dedd3230e440ae50fb1610e0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 09:13:03.408 ***
bob_subscribe_1979@domain.example.com/res1 in
<iq type='result' id='7c5f1ae8dedd3230e440ae50fb1610e0'>
	<session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
</iq>



*** User 2022-05-25 09:13:03.408 ***
bob_subscribe_1979@domain.example.com/res1 out
<presence/>



*** User 2022-05-25 09:13:03.409 ***
bob_subscribe_1979@domain.example.com/res1 in
<presence from='bob_subscribe_1979@domain.example.com/res1' to='bob_subscribe_1979@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-25 09:13:03.409 ***
alice_subscribe_1979@domain.example.com/res1 out
<iq type='set' id='516439683e9803bedc15454b8ee10203'>
	<query xmlns='jabber:iq:roster'>
		<item jid='bob_subscribe_1979@domain.example.com' name='Bobby'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-05-25 09:13:03.412 ***
alice_subscribe_1979@domain.example.com/res1 in
<iq from='alice_subscribe_1979@domain.example.com' to='alice_subscribe_1979@domain.example.com/res1' id='pushd69cab638a7e5e3e' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' name='Bobby' jid='bob_subscribe_1979@domain.example.com'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-05-25 09:13:03.412 ***
alice_subscribe_1979@domain.example.com/res1 in
<iq from='alice_subscribe_1979@domain.example.com' to='alice_subscribe_1979@domain.example.com/res1' id='516439683e9803bedc15454b8ee10203' type='result'/>



*** User 2022-05-25 09:13:03.412 ***
alice_subscribe_1979@domain.example.com/res1 out
<iq to='alice_subscribe_1979@domain.example.com' id='pushd69cab638a7e5e3e' type='result'/>



*** User 2022-05-25 09:13:03.412 ***
alice_subscribe_1979@domain.example.com/res1 out
<presence type='subscribe' to='bob_subscribe_1979@domain.example.com'/>



*** User 2022-05-25 09:13:03.421 ***
alice_subscribe_1979@domain.example.com/res1 in
<iq from='alice_subscribe_1979@domain.example.com' to='alice_subscribe_1979@domain.example.com/res1' id='pushf840f08d7420f020' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item ask='subscribe' subscription='none' name='Bobby' jid='bob_subscribe_1979@domain.example.com'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-05-25 09:13:03.421 ***
alice_subscribe_1979@domain.example.com/res1 out
<iq to='alice_subscribe_1979@domain.example.com' id='pushf840f08d7420f020' type='result'/>



*** User 2022-05-25 09:13:03.422 ***
bob_subscribe_1979@domain.example.com/res1 in
<presence from='alice_subscribe_1979@domain.example.com' to='bob_subscribe_1979@domain.example.com/res1' xml:lang='en' type='subscribe'/>



*** User 2022-05-25 09:13:03.422 ***
bob_subscribe_1979@domain.example.com/res1 out
<iq type='get' id='d4a16f65c1030f682a7931feeec40063'>
	<query xmlns='jabber:iq:roster'/>
</iq>



*** User 2022-05-25 09:13:03.423 ***
bob_subscribe_1979@domain.example.com/res1 in
<iq from='bob_subscribe_1979@domain.example.com' to='bob_subscribe_1979@domain.example.com/res1' id='d4a16f65c1030f682a7931feeec40063' type='result'>
	<query xmlns='jabber:iq:roster'/>
</iq>



*** User 2022-05-25 09:13:03.423 ***
Roster: {xmlel,<<"iq">>,
               [{<<"from">>,<<"bob_subscribe_1979@domain.example.com">>},
                {<<"to">>,<<"bob_subscribe_1979@domain.example.com/res1">>},
                {<<"id">>,<<"d4a16f65c1030f682a7931feeec40063">>},
                {<<"type">>,<<"result">>}],
               [{xmlel,<<"query">>,
                       [{<<"xmlns">>,<<"jabber:iq:roster">>}],
                       []}]}

*** User 2022-05-25 09:13:03.424 ***
bob_subscribe_1979@domain.example.com/res1 out
<iq type='set' id='b4629191f1cd6cb4336e47fec23a6a4c'>
	<query xmlns='jabber:iq:roster'>
		<item jid='alice_subscribe_1979@domain.example.com' name='Alice'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-05-25 09:13:03.427 ***
bob_subscribe_1979@domain.example.com/res1 in
<iq from='bob_subscribe_1979@domain.example.com' to='bob_subscribe_1979@domain.example.com/res1' id='push8ecaf06a997ce871' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='none' name='Alice' jid='alice_subscribe_1979@domain.example.com'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-05-25 09:13:03.427 ***
bob_subscribe_1979@domain.example.com/res1 out
<iq to='bob_subscribe_1979@domain.example.com' id='push8ecaf06a997ce871' type='result'/>



*** User 2022-05-25 09:13:03.427 ***
bob_subscribe_1979@domain.example.com/res1 in
<iq from='bob_subscribe_1979@domain.example.com' to='bob_subscribe_1979@domain.example.com/res1' id='b4629191f1cd6cb4336e47fec23a6a4c' type='result'/>



*** User 2022-05-25 09:13:03.427 ***
bob_subscribe_1979@domain.example.com/res1 out
<presence type='subscribed' to='alice_subscribe_1979@domain.example.com'/>



*** User 2022-05-25 09:13:03.435 ***
alice_subscribe_1979@domain.example.com/res1 in
<iq from='alice_subscribe_1979@domain.example.com' to='alice_subscribe_1979@domain.example.com/res1' id='push90fb2177c7a99ffa' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='to' name='Bobby' jid='bob_subscribe_1979@domain.example.com'>
			<group>friends</group>
		</item>
	</query>
</iq>



*** User 2022-05-25 09:13:03.435 ***
alice_subscribe_1979@domain.example.com/res1 in
<presence from='bob_subscribe_1979@domain.example.com' to='alice_subscribe_1979@domain.example.com/res1' xml:lang='en' type='subscribed'/>



*** User 2022-05-25 09:13:03.435 ***
alice_subscribe_1979@domain.example.com/res1 in
<presence from='bob_subscribe_1979@domain.example.com/res1' to='alice_subscribe_1979@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-25 09:13:03.435 ***
bob_subscribe_1979@domain.example.com/res1 in
<iq from='bob_subscribe_1979@domain.example.com' to='bob_subscribe_1979@domain.example.com/res1' id='pushef0c8f3b97c1d7bd' type='set'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' name='Alice' jid='alice_subscribe_1979@domain.example.com'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-05-25 09:13:03.435 ***
bob_subscribe_1979@domain.example.com/res1 out
<iq type='get' id='94871445e1d66b161823dcdd6dfa1d01'>
	<query xmlns='jabber:iq:roster'/>
</iq>



*** User 2022-05-25 09:13:03.468 ***
bob_subscribe_1979@domain.example.com/res1 in
<iq from='bob_subscribe_1979@domain.example.com' to='bob_subscribe_1979@domain.example.com/res1' id='94871445e1d66b161823dcdd6dfa1d01' type='result'>
	<query xmlns='jabber:iq:roster'>
		<item subscription='from' name='Alice' jid='alice_subscribe_1979@domain.example.com'>
			<group>enemies</group>
		</item>
	</query>
</iq>



*** User 2022-05-25 09:13:03.468 ***
Roster: {xmlel,<<"iq">>,
            [{<<"from">>,<<"bob_subscribe_1979@domain.example.com">>},
             {<<"to">>,<<"bob_subscribe_1979@domain.example.com/res1">>},
             {<<"id">>,<<"94871445e1d66b161823dcdd6dfa1d01">>},
             {<<"type">>,<<"result">>}],
            [{xmlel,<<"query">>,
                 [{<<"xmlns">>,<<"jabber:iq:roster">>}],
                 [{xmlel,<<"item">>,
                      [{<<"subscription">>,<<"from">>},
                       {<<"name">>,<<"Alice">>},
                       {<<"jid">>,
                        <<"alice_subscribe_1979@domain.example.com">>}],
                      [{xmlel,<<"group">>,[],[{xmlcdata,<<"enemies">>}]}]}]}]}

*** User 2022-05-25 09:13:03.468 ***
bob_subscribe_1979@domain.example.com/res1 out
<presence/>



*** User 2022-05-25 09:13:03.469 ***
alice_subscribe_1979@domain.example.com/res1 in
<presence from='bob_subscribe_1979@domain.example.com/res1' to='alice_subscribe_1979@domain.example.com/res1' xml:lang='en'/>



*** User 2022-05-25 09:13:03.469 ***
bob_subscribe_1979@domain.example.com/res1 out
<presence type='unavailable'/>



*** User 2022-05-25 09:13:03.470 ***
alice_subscribe_1979@domain.example.com/res1 in
<presence from='bob_subscribe_1979@domain.example.com/res1' to='alice_subscribe_1979@domain.example.com/res1' xml:lang='en' type='unavailable'/>



*** User 2022-05-25 09:13:03.470 ***
bob_subscribe_1979@domain.example.com/res1 out
</stream:stream>

*** User 2022-05-25 09:13:03.470 ***
bob_subscribe_1979@domain.example.com/res1 in
</stream:stream>

*** User 2022-05-25 09:13:03.470 ***
alice_subscribe_1979@domain.example.com/res1 out
</stream:stream>

*** User 2022-05-25 09:13:03.471 ***
alice_subscribe_1979@domain.example.com/res1 in
</stream:stream>
*** CT 2022-05-25 09:13:03.495 *** View log from node ejabberd2@localhost when finished ejabberd2@localhost_520.html
*** CT 2022-05-25 09:13:03.495 *** View log from node mongooseim@localhost when finished mongooseim@localhost_2328.html



=== Ended at 2022-05-25 09:13:03
=== successfully completed test case
=== === Returned value: ok