add rpc test
change all the loop to event_loop