test: use T.TempDir
to create temporary test directory
#12853
Merged
T.TempDir
to create temporary test directory
#12853