test/distributor: fix return type of thread function