@@ -233,12 +233,12 @@ ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(PG_FUNCTION_ARGS)
233
233
BgwHandleStatus status = WaitForBackgroundWorkerStartup (worker_handle , & pid );
234
234
TestAssertTrue (BGWH_STARTED == status );
235
235
if (status != BGWH_STARTED )
236
- ereport (ERROR , (errcode (ERRCODE_TRIGGERED_ACTION_EXCEPTION ), errmsg ("bgw not started" )));
236
+ ereport (ERROR , (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ), errmsg ("bgw not started" )));
237
237
238
238
status = WaitForBackgroundWorkerShutdown (worker_handle );
239
239
TestAssertTrue (BGWH_STOPPED == status );
240
240
if (status != BGWH_STOPPED )
241
- ereport (ERROR , (errcode (ERRCODE_TRIGGERED_ACTION_EXCEPTION ), errmsg ("bgw not stopped" )));
241
+ ereport (ERROR , (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ), errmsg ("bgw not stopped" )));
242
242
243
243
PG_RETURN_VOID ();
244
244
}
@@ -266,7 +266,7 @@ ts_bgw_db_scheduler_test_run(PG_FUNCTION_ARGS)
266
266
status = WaitForBackgroundWorkerStartup (current_handle , & pid );
267
267
TestAssertTrue (BGWH_STARTED == status );
268
268
if (status != BGWH_STARTED )
269
- ereport (ERROR , (errcode (ERRCODE_TRIGGERED_ACTION_EXCEPTION ), errmsg ("bgw not started" )));
269
+ ereport (ERROR , (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ), errmsg ("bgw not started" )));
270
270
271
271
PG_RETURN_VOID ();
272
272
}
@@ -280,7 +280,7 @@ ts_bgw_db_scheduler_test_wait_for_scheduler_finish(PG_FUNCTION_ARGS)
280
280
TestAssertTrue (BGWH_STOPPED == status );
281
281
if (status != BGWH_STOPPED )
282
282
ereport (ERROR ,
283
- (errcode (ERRCODE_TRIGGERED_ACTION_EXCEPTION ), errmsg ("bgw not stopped" )));
283
+ (errcode (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE ), errmsg ("bgw not stopped" )));
284
284
}
285
285
PG_RETURN_VOID ();
286
286
}
0 commit comments