Fix some test codes problems



Signed-off-by: Haomai Wang <haomaiwang@gmail.com>