@@ -799,13 +799,13 @@ cbauth_many_notify_t() ->
799799 meck :wait (N , menelaus_cbauth_worker , notify , ['_' , '_' ],
800800 ? LONG_TIMEOUT )
801801 end , [2 , 3 , 4 ]),
802+ Parent = self (),
802803 % % Extract value from next update
803804 meck :expect (json_rpc_connection , perform_call ,
804805 fun (_ , " AuthCacheSvc.UpdateDB" , {Info }, _ ) ->
805806 [{Node }] = proplists :get_value (nodes , Info , []),
806- [undefined , Port ] = proplists :get_value (ports , Node ),
807- % % Expect the last value, not the stale value
808- ? assertEqual (4 , Port ),
807+ [Port ] = proplists :get_value (ports , Node ),
808+ Parent ! {port_sent , Port },
809809 {ok , true };
810810 (_Label , _Call , _EJsonArg , _Opts ) ->
811811 {ok , true }
@@ -815,7 +815,14 @@ cbauth_many_notify_t() ->
815815 WorkerPid ! return_from_call ,
816816 % % Wait for both the stuck and final call to return
817817 meck :wait (3 , json_rpc_connection , perform_call ,
818- ['_' , " AuthCacheSvc.UpdateDB" , '_' , '_' ], ? LONG_TIMEOUT ).
818+ ['_' , " AuthCacheSvc.UpdateDB" , '_' , '_' ], ? LONG_TIMEOUT ),
819+ receive
820+ {port_sent , Port } ->
821+ % % Expect the last value, not the stale value
822+ ? assertEqual (4 , Port )
823+ after ? LONG_TIMEOUT ->
824+ error (timeout )
825+ end .
819826
820827trigger_notification (ns_node_disco_events ) ->
821828 % % To avoid needing to trick ns_node_disco into recognising fake nodes, just
0 commit comments