Skip to content

Commit 68d9576

Browse files
committed
fix
1 parent a8710f4 commit 68d9576

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/src/bgw/scheduler_mock.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,12 @@ ts_bgw_db_scheduler_test_run_and_wait_for_scheduler_finish(PG_FUNCTION_ARGS)
233233
BgwHandleStatus status = WaitForBackgroundWorkerStartup(worker_handle, &pid);
234234
TestAssertTrue(BGWH_STARTED == status);
235235
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")));
237237

238238
status = WaitForBackgroundWorkerShutdown(worker_handle);
239239
TestAssertTrue(BGWH_STOPPED == status);
240240
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")));
242242

243243
PG_RETURN_VOID();
244244
}
@@ -266,7 +266,7 @@ ts_bgw_db_scheduler_test_run(PG_FUNCTION_ARGS)
266266
status = WaitForBackgroundWorkerStartup(current_handle, &pid);
267267
TestAssertTrue(BGWH_STARTED == status);
268268
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")));
270270

271271
PG_RETURN_VOID();
272272
}
@@ -280,7 +280,7 @@ ts_bgw_db_scheduler_test_wait_for_scheduler_finish(PG_FUNCTION_ARGS)
280280
TestAssertTrue(BGWH_STOPPED == status);
281281
if (status != BGWH_STOPPED)
282282
ereport(ERROR,
283-
(errcode(ERRCODE_TRIGGERED_ACTION_EXCEPTION), errmsg("bgw not stopped")));
283+
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("bgw not stopped")));
284284
}
285285
PG_RETURN_VOID();
286286
}

0 commit comments

Comments
 (0)