﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37002	Off-by-one error in parallel test worker index validation	Shashank Kushwaha		"In django/test/runner.py, the validation of _worker_id uses:

    if _worker_id > len(db_aliases):

However, valid worker IDs should range from 0 to len(db_aliases) - 1.

For example, if len(db_aliases) = 3, valid IDs are 0, 1, and 2. The current condition allows _worker_id == 3, which is invalid.

This appears to be an off-by-one error and should likely use:

    if _worker_id >= len(db_aliases):

This was observed while reviewing PR #20971."	Bug	closed	Testing framework	6.0	Normal	duplicate	parallel testing, off-by-one, worker-id	Shashank Kushwaha	Unreviewed	0	0	0	0	0	0
