flakytest.dev anze3db flakytest
Tests / apps/projects/tests.py

ProjectRunPage::test_not_logged_in

First seen 2 years, 10 months ago in b9e98d9
CI github-actions:test 12 runs
Average
62 ms
median 68 ms
max 82 ms
Phases
Setup 19 ms Call 43 ms Teardown 0.17 ms
Categories
Database 37 ms App code 0.21 ms Other (Libraries, pytest, Unsampled) 25 ms

37 database queries per run

Needs 418 KB of memory (max 888 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 16 hours ago · open run
Show pytest frames
setup19 ms28.9%
TestCase.setUpClassdjango/test/testcases.py:1423 cls.cls_atomics = cls._enter_atomics()13 ms20.0%
TestCase._enter_atomicsdjango/test/testcases.py:139613 ms20.0%
Atomic.__enter__django/db/transaction.py:19813 ms20.0%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45413 ms20.0%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30313 ms20.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms20.0%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27913 ms20.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms20.0%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25613 ms20.0%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2613 ms20.0%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:33313 ms20.0%
Connection.connectpsycopg/connection.py:10913 ms20.0%
wait_connpsycopg/waiting.py:1419 ms13.3%
EpollSelector.select<stdlib>/selectors.py:4529 ms13.3%
wait_connpsycopg/waiting.py:1454 ms6.7%
BaseConnection._connect_genpsycopg/_connection_base.py:4394 ms6.7%
TestCase.setUpClassdjango/test/testcases.py:1439 cls.setUpTestData()6 ms8.9%
ProjectRunPage.setUpTestDataapps/projects/tests.py:3043 ms4.4%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms4.4%
QuerySet.createdjango/db/models/query.py:6693 ms4.4%
Run.saveapps/projects/models.py:1871 ms2.2%
next_numberapps/projects/models.py:35 return (model.objects.filter(project_id=project_id).aggregate(last=models.Max("number"))["last"] or 0) + 11 ms2.2%
QuerySet.aggregatedjango/db/models/query.py:5941 ms2.2%
Query.get_aggregationdjango/db/models/sql/query.py:6331 ms2.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16221 ms2.2%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms2.2%
BaseDatabaseWrapper.cursordjango/db/backends/base/base.py:3201 ms2.2%
Run.saveapps/projects/models.py:188 super().save(*args, **kwargs)1 ms2.2%
Model.savedjango/db/models/base.py:8741 ms2.2%
Model.save_basedjango/db/models/base.py:9661 ms2.2%
Model._save_tabledjango/db/models/base.py:11671 ms2.2%
Model._do_insertdjango/db/models/base.py:12181 ms2.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms2.2%
QuerySet._insertdjango/db/models/query.py:19181 ms2.2%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19251 ms2.2%
CursorWrapper.executedjango/db/backends/utils.py:791 ms2.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms2.2%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms2.2%
Cursor.executepsycopg/cursor.py:1131 ms2.2%
Connection.waitpsycopg/connection.py:4951 ms2.2%
ProjectRunPage.setUpTestDataapps/projects/tests.py:3011 ms2.2%
make_projectapps/projects/testing.py:621 ms2.2%
unique_slugapps/orgs/models.py:46 while slug in reserved or taken.filter(slug=slug).exists():1 ms2.2%
QuerySet.existsdjango/db/models/query.py:13371 ms2.2%
Query.has_resultsdjango/db/models/sql/query.py:6811 ms2.2%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15921 ms2.2%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16241 ms2.2%
CursorWrapper.executedjango/db/backends/utils.py:791 ms2.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms2.2%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms2.2%
Cursor.executepsycopg/cursor.py:1131 ms2.2%
Connection.waitpsycopg/connection.py:4951 ms2.2%
ProjectRunPage.setUpTestDataapps/projects/tests.py:303 cls.ingest = Ingest.objects.create(project=cls.project, data={})1 ms2.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms2.2%
QuerySet.createdjango/db/models/query.py:6691 ms2.2%
Model.savedjango/db/models/base.py:8741 ms2.2%
Model.save_basedjango/db/models/base.py:9661 ms2.2%
Model._save_tabledjango/db/models/base.py:11671 ms2.2%
Model._do_insertdjango/db/models/base.py:12181 ms2.2%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms2.2%
QuerySet._insertdjango/db/models/query.py:19181 ms2.2%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19241 ms2.2%
SQLInsertCompiler.as_sqldjango/db/models/sql/compiler.py:18161 ms2.2%
call46 ms70.9%
ProjectRunPage.test_not_logged_inapps/projects/tests.py:312 response = self.client.get(self.url)33 ms51.2%
Client.getdjango/test/client.py:112433 ms51.2%
RequestFactory.getdjango/test/client.py:47533 ms51.2%
RequestFactory.genericdjango/test/client.py:67133 ms51.2%
Client.requestdjango/test/client.py:108233 ms51.2%
ClientHandler.__call__django/test/client.py:17331 ms47.3%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6231 ms47.3%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10431 ms47.3%
WhiteNoise.add_fileswhitenoise/base.py:10831 ms47.3%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12028 ms43.3%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13125 ms39.4%
WhiteNoise.get_static_filewhitenoise/base.py:20820 ms31.5%
StaticFile.__init__whitenoise/responders.py:778 ms11.8%
StaticFile.get_alternativeswhitenoise/responders.py:2008 ms11.8%
__init____init__:-13 ms3.9%
StaticFile.__init__whitenoise/responders.py:765 ms7.9%
StaticFile.__init__whitenoise/responders.py:735 ms7.9%
StaticFile.get_headerswhitenoise/responders.py:1813 ms3.9%
StaticFile.get_headerswhitenoise/responders.py:1783 ms3.9%
parsedate<stdlib>/email/_parseaddr.py:1853 ms3.9%
StaticFile.__init__whitenoise/responders.py:743 ms3.9%
Headers.__getitem__<stdlib>/wsgiref/headers.py:833 ms3.9%
WhiteNoise.get_static_filewhitenoise/base.py:2035 ms7.9%
WhiteNoise.add_cache_headerswhitenoise/base.py:2245 ms7.9%
WhiteNoiseMiddleware.immutable_file_testwhitenoise/middleware.py:1765 ms7.9%
WhiteNoiseMiddleware.get_static_urlwhitenoise/middleware.py:1975 ms7.9%
URLMixin.urldebug_toolbar/panels/staticfiles.py:205 ms7.9%
HashedFilesMixin.urldjango/contrib/staticfiles/storage.py:2053 ms3.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:1153 ms3.9%
scantreewhitenoise/base.py:2623 ms3.9%
scantreewhitenoise/base.py:2623 ms3.9%
scantreewhitenoise/base.py:2603 ms3.9%
ClientHandler.__call__django/test/client.py:1863 ms3.9%
BaseHandler.get_responsedjango/core/handlers/base.py:1413 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:1303 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:1233 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
MiddlewareMixin.__call__django/utils/deprecation.py:3093 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:343 ms3.9%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:553 ms3.9%
BaseHandler._get_responsedjango/core/handlers/base.py:1983 ms3.9%
project_runapps/projects/urls.py:4013 ms3.9%
find_projectapps/projects/urls.py:55 return None, redirect(reverse("account_login") + f"?next={request.path}")3 ms3.9%
ProjectRunPage.setUpapps/projects/tests.py:308 self.client.force_login(self.user)8 ms11.8%
ClientMixin.force_logindjango/test/client.py:8558 ms11.8%
ClientMixin._logindjango/test/client.py:8765 ms7.9%
ClientMixin.sessiondjango/test/client.py:8125 ms7.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1215 ms7.9%
SessionStore.createdjango/contrib/sessions/backends/db.py:703 ms3.9%
SessionBase._get_new_session_keydjango/contrib/sessions/backends/base.py:1983 ms3.9%
SessionStore.existsdjango/contrib/sessions/backends/db.py:633 ms3.9%
QuerySet.existsdjango/db/models/query.py:13373 ms3.9%
Query.has_resultsdjango/db/models/sql/query.py:6813 ms3.9%
SQLCompiler.has_resultsdjango/db/models/sql/compiler.py:15923 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms3.9%
Cursor.executepsycopg/cursor.py:1133 ms3.9%
Connection.waitpsycopg/connection.py:4953 ms3.9%
SessionStore.createdjango/contrib/sessions/backends/db.py:743 ms3.9%
SessionStore.savedjango/contrib/sessions/backends/db.py:1273 ms3.9%
Model.savedjango/db/models/base.py:8743 ms3.9%
Model.save_basedjango/db/models/base.py:9663 ms3.9%
Model._save_tabledjango/db/models/base.py:11673 ms3.9%
Model._do_insertdjango/db/models/base.py:12183 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms3.9%
QuerySet._insertdjango/db/models/query.py:19183 ms3.9%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19253 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms3.9%
Cursor.executepsycopg/cursor.py:1133 ms3.9%
Connection.waitpsycopg/connection.py:4953 ms3.9%
ClientMixin._logindjango/test/client.py:8813 ms3.9%
logindjango/contrib/auth/__init__.py:1753 ms3.9%
SessionBase.__contains__django/contrib/sessions/backends/base.py:523 ms3.9%
SessionBase._get_sessiondjango/contrib/sessions/backends/base.py:2513 ms3.9%
SessionStore.loaddjango/contrib/sessions/backends/db.py:553 ms3.9%
SessionStore._get_session_from_dbdjango/contrib/sessions/backends/db.py:343 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms3.9%
QuerySet.getdjango/db/models/query.py:6353 ms3.9%
QuerySet.__len__django/db/models/query.py:3723 ms3.9%
QuerySet._fetch_alldjango/db/models/query.py:20003 ms3.9%
ModelIterable.__iter__django/db/models/query.py:953 ms3.9%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16243 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1053 ms3.9%
Cursor.executepsycopg/cursor.py:1133 ms3.9%
Connection.waitpsycopg/connection.py:4953 ms3.9%
ProjectRunPage.test_not_logged_inapps/projects/tests.py:311 self.client.logout()3 ms3.9%
ClientMixin.logoutdjango/test/client.py:9273 ms3.9%
logoutdjango/contrib/auth/__init__.py:2583 ms3.9%
SessionBase.flushdjango/contrib/sessions/backends/base.py:4203 ms3.9%
SessionStore.deletedjango/contrib/sessions/backends/db.py:1753 ms3.9%
Model.deletedjango/db/models/base.py:12983 ms3.9%
Collector.deletedjango/db/models/deletion.py:4503 ms3.9%
Collector.can_fast_deletedjango/db/models/deletion.py:2053 ms3.9%
TransactionTestCase._post_teardowndjango/test/testcases.py:1240 self._fixture_teardown()3 ms3.9%
TestCase._fixture_teardowndjango/test/testcases.py:14953 ms3.9%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4833 ms3.9%
CursorWrapper.executedjango/db/backends/utils.py:793 ms3.9%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms3.9%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms3.9%
Cursor.executepsycopg/cursor.py:1133 ms3.9%
Connection.waitpsycopg/connection.py:4953 ms3.9%
Estimated from 31 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/projects/tests.py:312
response = self.client.get(self.url)
ProjectRunPage.test_not_logged_in · Libraries
31 ms
apps/projects/tests.py:308
self.client.force_login(self.user)
ProjectRunPage.setUp · Database
8 ms
apps/projects/tests.py:311
self.client.logout()
ProjectRunPage.test_not_logged_in · Database
3 ms
apps/projects/urls.py:55
return None, redirect(reverse("account_login") + f"?next={request.path}")
find_project · App code
3 ms
apps/orgs/models.py:46
while slug in reserved or taken.filter(slug=slug).exists():
unique_slug · Database
1 ms
apps/projects/tests.py:303
cls.ingest = Ingest.objects.create(project=cls.project, data={})
ProjectRunPage.setUpTestData · Database
1 ms
apps/projects/models.py:35
return (model.objects.filter(project_id=project_id).aggregate(last=models.Max("number"))["last"] or 0) + 1
next_number · Database
1 ms
apps/projects/models.py:188
super().save(*args, **kwargs)
Run.save · Database
1 ms

Fixtures

Exact setup time
_unittest_setUpClass_fixture_ProjectRunPage class 18 ms
_django_setup_unittest class 0.27 ms
_dj_autoclear_mailbox function 0.04 ms
_template_string_if_invalid_marker function 0.04 ms
_django_db_marker function 0.04 ms
_live_server_helper function 0.03 ms
_django_set_urlconf function 0.03 ms
_django_clear_site_cache function 0.02 ms
monkeypatch function 0.02 ms

Database

37 queries · 13 ms
No repeated queries.

Biggest pieces of work

call test body
apps/projects/tests.py:312
36 ms
setup setUpClass
django/test/testcases.py:1423
19 ms
call setUp
apps/projects/tests.py:308
8 ms
call _post_teardown
django/test/testcases.py:1240
3 ms

Reliability

12 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 12 results, oldest first in the strip
When Environment Outcome Duration Commit
16 hours ago CI github-actions:test passed 65 ms e141198 main Profile
1 week, 5 days ago CI github-actions:test passed 34 ms 46ec2aa main Profile
2 weeks, 1 day ago CI github-actions:test passed 68 ms afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 55 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 76 ms 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 48 ms b3fedae main Profile
2 weeks, 4 days ago CI github-actions:test passed 71 ms 43c4eda main Profile
2 weeks, 6 days ago CI github-actions:test passed 72 ms 9caa567 main Profile
2 weeks, 6 days ago CI github-actions:test passed 68 ms ec75501 main Profile
3 weeks ago CI github-actions:test passed 82 ms d2c12e5 main Profile
3 weeks ago CI github-actions:test passed 39 ms 0b902f6 main Profile
3 weeks ago CI github-actions:test passed 67 ms 78a4357 main Profile