There are couple of thread regarding same error but they are not active ,I think last they were active was around 1 yr back so I am opening the new thread .
This is probably due to running as @Test. You need to run it at Suite Level