use common func for barrier client test case instead.