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

TestResolveLegacyAccountsAndPosts::test_match_existing_account_by_id_and_instance_when_url_differs

First seen 3 weeks ago in 0c23747
CI github-actions:test 11 runs
Average
13 ms
median 14 ms
max 30 ms
Phases
Setup 2 ms Call 11 ms Teardown 0.39 ms
Categories
Database 11 ms Factories 0.54 ms Other (pytest, Unsampled, Libraries, Logging) 2 ms

9 database queries per run

Needs 0 KB of memory (max 0 KB)

Duration per run

Where the time goes

Latest run in ci:github-actions:test, 7 hours ago · open run
Show pytest frames
setup1 ms7.3%
call13 ms90.9%
TestResolveLegacyAccountsAndPosts.test_match_existing_account_by_id_and_instance_when_url_differsconfs/tests.py:284 resolve = _legacy_migration()._resolve_accounts(6 ms41.3%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:233 for account in _filter_by_pairs(lookup, "account_id", "instance", chunk):5 ms33.0%
QuerySet.__iter__django/db/models/query.py:4395 ms33.0%
QuerySet._fetch_alldjango/db/models/query.py:22625 ms33.0%
ModelIterable.__iter__django/db/models/query.py:1035 ms33.0%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16255 ms33.0%
CursorWrapper.executedjango/db/backends/utils.py:795 ms33.0%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:925 ms33.0%
CursorWrapper._executedjango/db/backends/utils.py:1055 ms33.0%
Cursor.executepsycopg/cursor.py:1135 ms33.0%
Connection.waitpsycopg/connection.py:4955 ms33.0%
BaseCursor._execute_genpsycopg/_cursor_base.py:2065 ms33.0%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2865 ms33.0%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:785 ms33.0%
_resolve_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:2271 ms8.3%
_index_accountsconfs/migrations/0033_remove_legacy_conference_tables.py:194 for account in accounts:1 ms8.3%
QuerySet.__iter__django/db/models/query.py:4391 ms8.3%
QuerySet._fetch_alldjango/db/models/query.py:22621 ms8.3%
ModelIterable.__iter__django/db/models/query.py:1031 ms8.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms8.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms8.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms8.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms8.3%
Cursor.executepsycopg/cursor.py:1131 ms8.3%
Connection.waitpsycopg/connection.py:4951 ms8.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms8.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms8.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms8.3%
TransactionTestCase._pre_setupdjango/test/testcases.py:1167 cls._fixture_setup()3 ms24.8%
TestCase._fixture_setupdjango/test/testcases.py:14813 ms24.8%
TestCase._enter_atomicsdjango/test/testcases.py:13993 ms24.8%
Atomic.__enter__django/db/transaction.py:2233 ms24.8%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:263 ms24.8%
BaseDatabaseWrapper.savepointdjango/db/backends/base/base.py:4003 ms24.8%
BaseDatabaseWrapper._savepointdjango/db/backends/base/base.py:3673 ms24.8%
CursorWrapper.executedjango/db/backends/utils.py:793 ms24.8%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:923 ms24.8%
CursorWrapper._executedjango/db/backends/utils.py:1033 ms24.8%
Cursor.executepsycopg/cursor.py:1133 ms24.8%
Connection.waitpsycopg/connection.py:4953 ms24.8%
BaseCursor._execute_genpsycopg/_cursor_base.py:2063 ms24.8%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2863 ms24.8%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:783 ms24.8%
TestResolveLegacyAccountsAndPosts.test_match_existing_account_by_id_and_instance_when_url_differsconfs/tests.py:277 existing = baker.make(1 ms8.3%
makemodel_bakery/baker.py:1751 ms8.3%
Baker.makemodel_bakery/baker.py:4541 ms8.3%
Baker._makemodel_bakery/baker.py:5421 ms8.3%
Baker.instancemodel_bakery/baker.py:6591 ms8.3%
Model.savedjango/db/models/base.py:9041 ms8.3%
Model.save_basedjango/db/models/base.py:9961 ms8.3%
Model._save_tabledjango/db/models/base.py:11991 ms8.3%
Model._do_insertdjango/db/models/base.py:12511 ms8.3%
BaseManager._get_queryset_methods.<locals>.create_method.<locals>.manager_methoddjango/db/models/manager.py:871 ms8.3%
QuerySet._insertdjango/db/models/query.py:21411 ms8.3%
SQLInsertCompiler.execute_sqldjango/db/models/sql/compiler.py:19361 ms8.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms8.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms8.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms8.3%
Cursor.executepsycopg/cursor.py:1131 ms8.3%
Connection.waitpsycopg/connection.py:4951 ms8.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms8.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms8.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms8.3%
TestResolveLegacyAccountsAndPosts.test_match_existing_account_by_id_and_instance_when_url_differsconfs/tests.py:299 self.assertEqual(Account.objects.filter(account_id="pair-id", instance="mastodon.social").count(), 1)1 ms8.3%
QuerySet.countdjango/db/models/query.py:6771 ms8.3%
Query.get_countdjango/db/models/sql/query.py:6571 ms8.3%
Query.get_aggregationdjango/db/models/sql/query.py:6391 ms8.3%
SQLCompiler.execute_sqldjango/db/models/sql/compiler.py:16251 ms8.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms8.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms8.3%
CursorWrapper._executedjango/db/backends/utils.py:1051 ms8.3%
Cursor.executepsycopg/cursor.py:1131 ms8.3%
Connection.waitpsycopg/connection.py:4951 ms8.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms8.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms8.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms8.3%
TransactionTestCase._post_teardowndjango/test/testcases.py:1243 self._fixture_teardown()1 ms8.3%
TestCase._fixture_teardowndjango/test/testcases.py:15001 ms8.3%
TestCase._rollback_atomicsdjango/test/testcases.py:14081 ms8.3%
Atomic.__exit__django/db/transaction.py:2951 ms8.3%
async_unsafe.<locals>.decorator.<locals>.innerdjango/utils/asyncio.py:261 ms8.3%
BaseDatabaseWrapper.savepoint_rollbackdjango/db/backends/base/base.py:4131 ms8.3%
BaseDatabaseWrapper._savepoint_rollbackdjango/db/backends/base/base.py:3711 ms8.3%
CursorWrapper.executedjango/db/backends/utils.py:791 ms8.3%
CursorWrapper._execute_with_wrappersdjango/db/backends/utils.py:921 ms8.3%
CursorWrapper._executedjango/db/backends/utils.py:1031 ms8.3%
Cursor.executepsycopg/cursor.py:1131 ms8.3%
Connection.waitpsycopg/connection.py:4951 ms8.3%
BaseCursor._execute_genpsycopg/_cursor_base.py:2061 ms8.3%
BaseCursor._maybe_prepare_genpsycopg/_cursor_base.py:2861 ms8.3%
ClientCursorMixin._execute_sendpsycopg/client_cursor.py:781 ms8.3%
Estimated from 12 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:233
for account in _filter_by_pairs(lookup, "account_id", "instance", chunk):
_resolve_accounts · Database
5 ms
confs/tests.py:277
existing = baker.make(
TestResolveLegacyAccountsAndPosts.test_match_existing_account_by_id_and_instance_when_url_differs · Database
1 ms
confs/migrations/0033_remove_legacy_conference_tables.py:194
for account in accounts:
_index_accounts · Database
1 ms
confs/tests.py:299
self.assertEqual(Account.objects.filter(account_id="pair-id", instance="mastodon.social").count(), 1)
TestResolveLegacyAccountsAndPosts.test_match_existing_account_by_id_and_instance_when_url_differs · Database
1 ms

Fixtures

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

Database

9 queries · 9 ms
No repeated queries.

Biggest pieces of work

call test body
confs/tests.py:284
8 ms
call _pre_setup
django/test/testcases.py:1167
3 ms
call _post_teardown
django/test/testcases.py:1243
1 ms
setup pytest internals 1 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
7 hours ago CI github-actions:test passed 14 ms c28a326 main Profile
16 hours ago CI github-actions:test passed 5 ms 9b8826a main Profile
22 hours ago CI github-actions:test passed 10 ms 4f01055 main Profile
1 week, 5 days ago CI github-actions:test passed 14 ms 8ab642e main Profile
2 weeks, 2 days ago CI github-actions:test passed 8 ms 9b75244 main Profile
2 weeks, 2 days ago CI github-actions:test passed 15 ms 9603516 main Profile
2 weeks, 4 days ago CI github-actions:test passed 15 ms 615a272 main Profile
3 weeks ago CI github-actions:test passed 11 ms d923a46 main Profile
3 weeks ago CI github-actions:test passed 30 ms 82997f8 main Profile
3 weeks ago CI github-actions:test passed 15 ms 623aa3e main Profile
3 weeks ago CI github-actions:test passed 8 ms ab6465a main Profile
3 weeks ago CI github-actions:test passed 6 ms 0c23747 main Run