Fix multiple calls of setUpBeforeClass
fix file end
Merge pull request #1610 from sanyatuning/1.8

Fix multiple calls of setUpBeforeClass