Option to skip the heaviest tests when running test suite

- Legacy-Id: 1843
This commit is contained in:
Pasi Eronen 2009-11-08 07:59:50 +00:00
parent 35eeca3039
commit 80ecf63284
4 changed files with 19 additions and 15 deletions

View file

@ -3,26 +3,26 @@
200 /drafts/wg/I/
200 /drafts/ind/F/
200 /drafts/other/tools/
200 /drafts/rfc/
200 /drafts/rfc/?sort=name
200 /drafts/current/
200 /drafts/all/
200 /drafts/dead/
200 /drafts/dead/?sort=name
200,heavy /drafts/rfc/
200,heavy /drafts/rfc/?sort=name
200,heavy /drafts/current/
200,heavy /drafts/all/
200,heavy /drafts/dead/
200,heavy /drafts/dead/?sort=name
301 /drafts/9574/related/
200 /drafts/draft-ietf-dnsext-dnssec-protocol/related/
301 /drafts/9574/
200 /drafts/draft-ietf-dnsext-dnssec-protocol/
200 /drafts/draft-ietf-dnsext-dnssec-protocol/
200 /drafts/draft-shockey-enum-cnam/ # non-ASCII title and abstract
200 /drafts/all_id_txt.html
200 /drafts/all_id.html
200,heavy /drafts/all_id_txt.html
200,heavy /drafts/all_id.html
200 /drafts/
200 /drafts/wg/11/
200 /drafts/?filename=mobike
200 /drafts/?first_name=joe
200 /drafts/?other_group=irtf
200 /drafts/?wg_id=1682
200 /drafts/_test/all_id.txt
200 /drafts/_test/id_index.txt
200 /drafts/_test/id_abstracts.txt
200,heavy /drafts/_test/all_id.txt
200,heavy /drafts/_test/id_index.txt
200,heavy /drafts/_test/id_abstracts.txt

View file

@ -33,5 +33,5 @@
# Test case for missing comment time (bug fixed in changeset 1733)
200 /feed/comments/draft-ietf-msec-newtype-keyid/
200 /sitemap-drafts.xml
200 /sitemap-idtracker.xml
200,heavy /sitemap-drafts.xml
200,heavy /sitemap-idtracker.xml

View file

@ -117,6 +117,7 @@ class SimpleUrlTestCase(TestCase,RealDatabaseTest):
self.ref_prefix = os.environ.get("IETFDB_REF_PREFIX", "")
if self.ref_prefix.endswith("/"):
self.ref_prefix = self.ref_prefix[:-1]
self.skip_heavy_tests = os.environ.get("IETFDB_SKIP_HEAVY", False)
def tearDown(self):
self.tearDownRealDatabase()
@ -140,6 +141,9 @@ class SimpleUrlTestCase(TestCase,RealDatabaseTest):
#enable this to see query counts
#settings.DEBUG = True
try:
if "heavy" in codes and self.skip_heavy_tests:
print "Skipping heavy test %s" % (url,)
return
now = datetime.utcnow()
response = self.client.get(baseurl, args)
elapsed_dt = datetime.utcnow()-now

View file

@ -11,5 +11,5 @@
200 /wg/v6ops-charter.txt
404 /wg/nosuchgroup-charter.html
404 /wg/nosuchgroup-charter.txt
200 /wg/1wg-charters.txt
200 /wg/1wg-charters-by-acronym.txt
200,heavy /wg/1wg-charters.txt
200,heavy /wg/1wg-charters-by-acronym.txt