flakytest.dev anze3db fedidevs
Tests / confs/tests.py

TestResolveLegacyAccountsAndPosts::test_creates_account_when_neither_url_nor_pair_match

First seen 14 hours ago in 0c23747
CI github-actions:test 4 runs
Average
48 ms
median 47 ms
max 71 ms
Phases
Setup 20 ms Call 28 ms Teardown 0.31 ms
Categories
Database 44 ms Other (pytest, Unsampled) 4 ms

12 database queries per run

Needs 4 KB of memory (max 12 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 8 hours ago · open run
Show pytest frames
setup10 ms37.4%
TestCase.setUpClassdjango/test/testcases.py:1426 cls.cls_atomics = cls._enter_atomics()10 ms37.4%
TestCase._enter_atomicsdjango/test/testcases.py:139910 ms37.4%
Atomic.__enter__django/db/transaction.py:21010 ms37.4%
BaseDatabaseWrapper.get_autocommitdjango/db/backends/base/base.py:45410 ms37.4%
SimpleTestCase.ensure_connection_patch_method.<locals>.patched_ensure_connectiondjango/test/testcases.py:30410 ms37.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms37.4%
BaseDatabaseWrapper.ensure_connectiondjango/db/backends/base/base.py:27910 ms37.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms37.4%
BaseDatabaseWrapper.connectdjango/db/backends/base/base.py:25610 ms37.4%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:2610 ms37.4%
DatabaseWrapper.get_new_connectiondjango/db/backends/postgresql/base.py:34510 ms37.4%
Connection.connectpsycopg/connection.py:10910 ms37.4%
wait_connpsycopg/waiting.py:1458 ms32.0%
BaseConnection._connect_genpsycopg/_connection_base.py:4398 ms32.0%
wait_connpsycopg/waiting.py:1411 ms5.3%
EpollSelector.select<stdlib>/selectors.py:4521 ms5.3%
call16 ms61.7%
TestResolveLegacyAccountsAndPosts.test_creates_account_when_neither_url_nor_pair_matchconfs/tests.py:302 resolve = _legacy_migration()._resolve_accounts(12 ms45.2%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:2277 ms28.8%
_index_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:194 for account in accounts:7 ms28.8%
QuerySet.__iter__django/db/models/query.py:4397 ms28.8%
QuerySet._fetch_alldjango/db/models/query.py:22627 ms28.8%
ModelIterable.__iter__django/db/models/query.py:1036 ms24.7%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16256 ms24.7%
CursorWrapper.executedjango/db/backends/utils.py:796 ms24.7%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:926 ms24.7%
CursorWrapper._executedjango/db/backends/utils.py:1056 ms24.7%
Cursor.executepsycopg/cursor.py:1136 ms24.7%
Connection.waitpsycopg/connection.py:4956 ms24.7%
ModelIterable.__iter__django/db/models/query.py:1351 ms4.1%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:250 account_model.objects.bulk_create(to_create, ignore_conflicts=True, batch_size=IN_CHUNK_SIZE)3 ms12.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:873 ms12.3%
QuerySet.bulk_createdjango/db/models/query.py:9003 ms12.3%
QuerySet._batched_insertdjango/db/models/query.py:21792 ms8.2%
QuerySet._insertdjango/db/models/query.py:21412 ms8.2%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19362 ms8.2%
CursorWrapper.executedjango/db/backends/utils.py:792 ms8.2%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:922 ms8.2%
CursorWrapper._executedjango/db/backends/utils.py:1052 ms8.2%
Cursor.executepsycopg/cursor.py:1132 ms8.2%
Connection.waitpsycopg/connection.py:4952 ms8.2%
BaseCursor._execute_genpsycopg/_cursor_base.py:2062 ms8.2%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2862 ms8.2%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:782 ms8.2%
QuerySet._batched_insertdjango/db/models/query.py:21581 ms4.1%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:2531 ms4.1%
_index_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:194 for account in accounts:1 ms4.1%
QuerySet.__iter__django/db/models/query.py:4391 ms4.1%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms4.1%
ModelIterable.__iter__django/db/models/query.py:1031 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:791 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms4.1%
Cursor.executepsycopg/cursor.py:1131 ms4.1%
Connection.waitpsycopg/connection.py:4951 ms4.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms4.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms4.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms4.1%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()2 ms8.2%
TestCase._fixture_teardowndjango/test/testcases.py:14971 ms4.1%
TestCase._should_check_constraintsdjango/test/testcases.py:15061 ms4.1%
DatabaseWrapper.is_usabledjango/db/backends/postgresql/base.py:5041 ms4.1%
Cursor.executepsycopg/cursor.py:1131 ms4.1%
Connection.waitpsycopg/connection.py:4951 ms4.1%
TestCase._fixture_teardowndjango/test/testcases.py:14981 ms4.1%
DatabaseWrapper.check_constraintsdjango/db/backends/postgresql/base.py:4961 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:791 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms4.1%
Cursor.executepsycopg/cursor.py:1131 ms4.1%
Connection.waitpsycopg/connection.py:4951 ms4.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms4.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms4.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms4.1%
TestResolveLegacyAccountsAndPosts.test_creates_account_when_neither_url_nor_pair_matchconfs/tests.py:317 self.assertEqual(matched.username, "newuser")1 ms4.1%
DeferredAttribute.__get__django/db/models/query_utils.py:2791 ms4.1%
FetchOne.fetchdjango/db/models/fetch_modes.py:171 ms4.1%
DeferredAttribute.fetch_onedjango/db/models/query_utils.py:2971 ms4.1%
Model.refresh_from_dbdjango/db/models/base.py:7881 ms4.1%
QuerySet.getdjango/db/models/query.py:7021 ms4.1%
QuerySet.__len__django/db/models/query.py:4211 ms4.1%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms4.1%
ModelIterable.__iter__django/db/models/query.py:1031 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:791 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms4.1%
Cursor.executepsycopg/cursor.py:1131 ms4.1%
Connection.waitpsycopg/connection.py:4951 ms4.1%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms4.1%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms4.1%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms4.1%
TestResolveLegacyAccountsAndPosts.test_creates_account_when_neither_url_nor_pair_matchconfs/tests.py:318 self.assertEqual(Account.objects.filter(url="https://fosstodon.org/@newuser").count(), 1)1 ms4.1%
QuerySet.countdjango/db/models/query.py:6771 ms4.1%
Query.get_countdjango/db/models/sql/query.py:6571 ms4.1%
Query.get_aggregationdjango/db/models/sql/query.py:6391 ms4.1%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms4.1%
CursorWrapper.executedjango/db/backends/utils.py:791 ms4.1%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms4.1%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms4.1%
Cursor.executepsycopg/cursor.py:1131 ms4.1%
Connection.waitpsycopg/connection.py:4951 ms4.1%
Estimated from 22 samples; phase durations are exact. Frames from pytest and pluggy are hidden .

Hot lines in your code

confs/migrations/0033_remove_legacy_conference_tables.py:194
for account in accounts:
_index_accounts · Database
8 ms
confs/migrations/0033_remove_legacy_conference_tables.py:250
account_model.objects.bulk_create(to_create, ignore_conflicts=True, batch_size=IN_CHUNK_SIZE)
_resolve_accounts · Database
3 ms
confs/tests.py:317
self.assertEqual(matched.username, "newuser")
TestResolveLegacyAccountsAndPosts.test_creates_account_when_neither_url_nor_pair_match · Database
1 ms
confs/tests.py:318
self.assertEqual(Account.objects.filter(url="https://fosstodon.org/@newuser").count(), 1)
TestResolveLegacyAccountsAndPosts.test_creates_account_when_neither_url_nor_pair_match · Database
1 ms

Fixtures

Exact setup time
_unittest_setUpClass_fixture_TestResolveLegacyAccountsAndPosts class 8 ms
_django_setup_unittest class 0.24 ms
_django_db_marker function 0.06 ms
_template_string_if_invalid_marker function 0.05 ms
_live_server_helper function 0.04 ms
_dj_autoclear_mailbox function 0.04 ms
_django_isolate_apps function 0.03 ms
monkeypatch function 0.03 ms
_django_clear_site_cache function 0.03 ms
_django_set_urlconf function 0.03 ms

Database

12 queries · 12 ms
No repeated queries.

Biggest pieces of work

call test body
confs/tests.py:302
14 ms
setup setUpClass
django/test/testcases.py:1426
10 ms
call _post_teardown
django/test/testcases.py:1243
2 ms

Reliability

5 results · 0 CI failures · 0 local failures

This test hasn't failed recently.

History

Latest 5 results, oldest first in the strip
When Environment Outcome Duration Commit
8 hours ago CI github-actions:test passed 26 ms d923a46 main Profile
8 hours ago CI github-actions:test passed 71 ms 82997f8 main Profile
8 hours ago CI github-actions:test passed 62 ms 623aa3e main Profile
13 hours ago CI github-actions:test passed 32 ms ab6465a main Profile
14 hours ago CI github-actions:test passed 17 ms 0c23747 main Run