Fix NUM_TOKENS usage in thrift_tests
Merge branch 'master' into python-driver