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

IngestEnvironmentTest::test_new_client_environment_and_git_changes

First seen 3 weeks ago in 78a4357
CI github-actions:test 12 runs
Average
55 ms
median 58 ms
max 83 ms
Phases
Setup 0.72 ms Call 54 ms Teardown 0.17 ms
Categories
Database 30 ms App code 0.21 ms Other (Libraries, Unsampled, pytest, Serialization) 24 ms

38 database queries per run

Needs 1 KB of memory (max 8 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 16 hours ago · open run
Show pytest frames
setup0.83 ms1.2%
__init____init__:-10.83 ms1.2%
signature<stdlib>/inspect.py:33430.83 ms1.2%
call67 ms98.5%
IngestEnvironmentTest.test_new_client_environment_and_git_changesapps/api/tests.py:362 session = self.ingest_start(65 ms94.6%
IngestEnvironmentTest.ingest_startapps/api/tests.py:352 response = self.client.post(65 ms94.6%
Client.postdjango/test/client.py:115365 ms94.6%
RequestFactory.postdjango/test/client.py:49965 ms94.6%
RequestFactory.genericdjango/test/client.py:67162 ms90.6%
Client.requestdjango/test/client.py:108262 ms90.6%
ClientHandler.__call__django/test/client.py:17338 ms55.2%
BaseHandler.load_middlewaredjango/core/handlers/base.py:6238 ms55.2%
WhiteNoiseMiddleware.__init__whitenoise/middleware.py:10438 ms55.2%
WhiteNoise.add_fileswhitenoise/base.py:10838 ms55.2%
WhiteNoise.update_files_dictionarywhitenoise/base.py:12024 ms35.5%
WhiteNoise.add_file_to_dictionarywhitenoise/base.py:13124 ms35.5%
WhiteNoise.get_static_filewhitenoise/base.py:20816 ms23.6%
StaticFile.__init__whitenoise/responders.py:778 ms11.8%
StaticFile.get_alternativeswhitenoise/responders.py:2008 ms11.8%
StaticFile.__init__whitenoise/responders.py:763 ms3.9%
StaticFile.get_not_modified_responsewhitenoise/responders.py:1883 ms3.9%
StaticFile.__init__whitenoise/responders.py:723 ms3.9%
StaticFile.get_file_statswhitenoise/responders.py:1613 ms3.9%
__init____init__:-13 ms3.9%
FileEntry.__init__whitenoise/responders.py:2633 ms3.9%
FileEntry.stat_regular_filewhitenoise/responders.py:2763 ms3.9%
StaticFile.__init__whitenoise/responders.py:733 ms3.9%
StaticFile.get_headerswhitenoise/responders.py:1763 ms3.9%
formatdate<stdlib>/email/utils.py:2663 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%
WhiteNoise.get_static_filewhitenoise/base.py:2023 ms3.9%
WhiteNoise.update_files_dictionarywhitenoise/base.py:11513 ms19.7%
scantreewhitenoise/base.py:26213 ms19.7%
scantreewhitenoise/base.py:26213 ms19.7%
scantreewhitenoise/base.py:2563 ms3.9%
scantreewhitenoise/base.py:2623 ms3.9%
scantreewhitenoise/base.py:2623 ms3.9%
scantreewhitenoise/base.py:2623 ms3.9%
scantreewhitenoise/base.py:2643 ms3.9%
scantreewhitenoise/base.py:2603 ms3.9%
ClientHandler.__call__django/test/client.py:18624 ms35.5%
BaseHandler.get_responsedjango/core/handlers/base.py:14124 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
DebugToolbarMiddleware.__call__debug_toolbar/middleware.py:13024 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30924 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
WhiteNoiseMiddleware.__call__whitenoise/middleware.py:12324 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30924 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30924 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30924 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30924 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30924 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
MiddlewareMixin.__call__django/utils/deprecation.py:30924 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
AccountMiddleware.<locals>.middlewareallauth/account/middleware.py:3424 ms35.5%
convert_exception_to_response.<locals>.innerdjango/core/handlers/exception.py:5524 ms35.5%
BaseHandler._get_responsedjango/core/handlers/base.py:19824 ms35.5%
csrf_exempt.<locals>._view_wrapperdjango/views/decorators/csrf.py:6524 ms35.5%
jsonify_errors.<locals>.wrapped_viewapps/api/urls.py:3724 ms35.5%
require_http_methods.<locals>.decorator.<locals>.innerdjango/views/decorators/http.py:6424 ms35.5%
api_request.<locals>.decorator.<locals>.wrapped_viewapps/api/urls.py:7524 ms35.5%
ingest_startapps/api/urls.py:100 process_ingest_start(ingest.id)24 ms35.5%
_SharedTaskProxy.__call__potatoq/app.py:76324 ms35.5%
Task.__call__potatoq/task.py:18924 ms35.5%
process_ingest_startapps/api/tasks.py:58 project=ingest.project,16 ms23.6%
ForwardManyToOneDescriptor.__get__django/db/models/fields/related_descriptors.py:24411 ms15.8%
ForeignObject.get_local_related_valuedjango/db/models/fields/related.py:81211 ms15.8%
ForeignObject.get_instance_value_for_fieldsdjango/db/models/fields/related.py:83411 ms15.8%
DeferredAttribute.__get__django/db/models/query_utils.py:27111 ms15.8%
Model.refresh_from_dbdjango/db/models/base.py:75811 ms15.8%
QuerySet.getdjango/db/models/query.py:63511 ms15.8%
QuerySet.__len__django/db/models/query.py:37211 ms15.8%
QuerySet._fetch_alldjango/db/models/query.py:200011 ms15.8%
ModelIterable.__iter__django/db/models/query.py:9511 ms15.8%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:162411 ms15.8%
CursorWrapper.executedjango/db/backends/utils.py:7911 ms15.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:9211 ms15.8%
CursorWrapper._executedjango/db/backends/utils.py:10511 ms15.8%
Cursor.executepsycopg/cursor.py:11311 ms15.8%
Connection.waitpsycopg/connection.py:49511 ms15.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:20611 ms15.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:28611 ms15.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:7811 ms15.8%
ForwardManyToOneDescriptor.__get__django/db/models/fields/related_descriptors.py:2575 ms7.9%
ForwardManyToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:2203 ms3.9%
ForwardManyToOneDescriptor.get_objectdjango/db/models/fields/related_descriptors.py:2223 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:16113 ms3.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7673 ms3.9%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:863 ms3.9%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:753 ms3.9%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:2553 ms3.9%
process_ingest_startapps/api/tasks.py:773 ms3.9%
get_or_create_numberedapps/projects/models.py:24 return model.objects.create(project=project, number=number, **lookup, **(defaults or {})), True3 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms3.9%
QuerySet.createdjango/db/models/query.py:6673 ms3.9%
Model.__init__django/db/models/base.py:5663 ms3.9%
process_ingest_startapps/api/tasks.py:843 ms3.9%
get_or_create_environmentapps/projects/environments.py:63 obj, created = Environment.objects.get_or_create(3 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms3.9%
QuerySet.get_or_createdjango/db/models/query.py:9943 ms3.9%
QuerySet.createdjango/db/models/query.py:6693 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:19243 ms3.9%
SQLInsertCompiler.as_sqldjango/db/models/sql/compiler.py:18133 ms3.9%
process_ingest_startapps/api/tasks.py:89 Session.objects.get_or_create(3 ms3.9%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms3.9%
QuerySet.get_or_createdjango/db/models/query.py:9873 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:16113 ms3.9%
SQLCompiler.as_sqldjango/db/models/sql/compiler.py:7673 ms3.9%
SQLCompiler.pre_sql_setupdjango/db/models/sql/compiler.py:863 ms3.9%
SQLCompiler.setup_querydjango/db/models/sql/compiler.py:753 ms3.9%
SQLCompiler.get_selectdjango/db/models/sql/compiler.py:3173 ms3.9%
SQLCompiler.compiledjango/db/models/sql/compiler.py:5783 ms3.9%
Col.as_sqldjango/db/models/expressions.py:13253 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%
teardown0.20 ms0.3%
Estimated from 27 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

apps/api/tests.py:352
response = self.client.post(
IngestEnvironmentTest.ingest_start · Libraries
40 ms
apps/api/tasks.py:58
project=ingest.project,
process_ingest_start · Database
16 ms
apps/projects/models.py:24
return model.objects.create(project=project, number=number, **lookup, **(defaults or {})), True
get_or_create_numbered · Database
3 ms
apps/projects/environments.py:63
obj, created = Environment.objects.get_or_create(
get_or_create_environment · Database
3 ms
apps/api/tasks.py:89
Session.objects.get_or_create(
process_ingest_start · Database
3 ms

Fixtures

Exact setup time
_live_server_helper function 0.06 ms
_dj_autoclear_mailbox function 0.05 ms
_template_string_if_invalid_marker function 0.05 ms
_django_db_marker function 0.05 ms
_django_set_urlconf function 0.04 ms
_django_clear_site_cache function 0.03 ms
monkeypatch function 0.02 ms

Database

38 queries · 12 ms
No repeated queries.

Biggest pieces of work

call test body
apps/api/tests.py:362
65 ms
call _post_teardown
django/test/testcases.py:1240
3 ms
setup __init__
__init__:-1
0.83 ms
teardown pytest internals 0.20 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 68 ms e141198 main Profile
1 week, 5 days ago CI github-actions:test passed 33 ms 46ec2aa main Profile
2 weeks, 1 day ago CI github-actions:test passed 59 ms afde85b main Profile
2 weeks, 1 day ago CI github-actions:test passed 46 ms fe29f9d main Profile
2 weeks, 1 day ago CI github-actions:test passed 63 ms 044719a main Profile
2 weeks, 2 days ago CI github-actions:test passed 35 ms b3fedae main Profile
2 weeks, 4 days ago CI github-actions:test passed 60 ms 43c4eda main Profile
2 weeks, 6 days ago CI github-actions:test passed 59 ms 9caa567 main Profile
2 weeks, 6 days ago CI github-actions:test passed 56 ms ec75501 main Profile
3 weeks ago CI github-actions:test passed 83 ms d2c12e5 main Profile
3 weeks ago CI github-actions:test passed 38 ms 0b902f6 main Profile
3 weeks ago CI github-actions:test passed 56 ms 78a4357 main Profile