nYou can pass in a timeout parameter to the
test annotation to
specify the timeout period in
milliseconds. If the test takes more, it fails.
n
nE.g. A method annotated with @Test
(timeout=10) fails if it takes more than 10 milliseconds.
n
n@Test(timeout=500)
npublic
void retrieveAllElementsInDocument() {
n doc.query("//*");
n}
n