Scheduled testing hung and now tests don't rollback

pauline_handel
Giga Guru

My scheduled overnight tests in Dev hung for no obvious reason and I ended up killing the job after 12 hours runtime. There are no active/pending tests or transactions (besides my current one) but I'm seeing this error in the logs and manually executed tests aren't rolling back.

"ATFRollback: Rollback denied for reason: A rollback context exists in an active state (e2617861db8f57006dfb9532ca961920), you cannot rollback while another context is in progress or reverting"

Does anyone know how I can fix this? I'm assuming that a system clone would clear the slate but I'd rather not do one at present if I can avoid it.

1 ACCEPTED SOLUTION

pavla
Tera Expert

Late, but maybe it will help someone else struggling with this issue.

The ATF was not rolling back the changes and the data created in the test were not removed. 

I checked the log, filtered it by ATF and there was this error:

"ATFRollback: Rollback denied for reason: A rollback context exists in an active state (e2617861db8f57006dfb9532ca961920), you cannot rollback while another context is in progress or reverting"

There is an active record in sys_rollback_context table. You need to change to state from active to not active (Rolled back)

Run a script in the background script to change the state of the active record in sys_rollback_context table to Rolled back.

View solution in original post

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

Hi,

Below post should help you to solve your ATF rollback issue

 

https://community.servicenow.com/community?id=community_question&sys_id=1afe4ba1dbdcdbc01dcaf3231f961971

 

Regards,

Sachin

pauline_handel
Giga Guru

Unfortunately, no but thanks for the suggestion. That post is someone wanting to disable the rollback feature. In my case the rollback process has hung and I can't restart it. I'll raise a HI ticket.

pavla
Tera Expert

Late, but maybe it will help someone else struggling with this issue.

The ATF was not rolling back the changes and the data created in the test were not removed. 

I checked the log, filtered it by ATF and there was this error:

"ATFRollback: Rollback denied for reason: A rollback context exists in an active state (e2617861db8f57006dfb9532ca961920), you cannot rollback while another context is in progress or reverting"

There is an active record in sys_rollback_context table. You need to change to state from active to not active (Rolled back)

Run a script in the background script to change the state of the active record in sys_rollback_context table to Rolled back.

Thanks Pavla,

 

I haven't had this occur again recently but that sounds exactly like the solution to the problem.

 

Cheers,

 

Pauline