test code and thrift