Skip to content

Instantly share code, notes, and snippets.

@tonypiazza
Last active September 27, 2015 10:28
Show Gist options
  • Save tonypiazza/1255692 to your computer and use it in GitHub Desktop.
Save tonypiazza/1255692 to your computer and use it in GitHub Desktop.
Example usage of the timeout attribute of the org.junit.Test annotation
@Test(timeout=3000)
public void canGetListOfAllPastAuctions() throws ServiceException {
AuctionService service = new BaseAuctionService();
service.loadAuctionHistory();
Collection<Auction> pastAuctions = service.getPastAuctions();
assertNotNull("unable to get past auctions", pastAuctions);
assertTrue("no past auctions", pastAuctions.size() > 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment