write gaia stackqueue and queue's test case and fix some bugs.