fix macros more

This commit is contained in:
Christian Schwarz
2025-07-11 13:03:22 +02:00
parent 9aeee51bf3
commit ac5279e600
4 changed files with 16 additions and 15 deletions

View File

@@ -24,7 +24,7 @@ use crate::http::extract::Json;
pub(in crate::http) async fn configure_failpoints(
failpoints: Json<ConfigureFailpointsRequest>,
) -> Response {
if !fail::has_failpoints() {
if !neon_failpoint::has_failpoints() {
return JsonResponse::error(
StatusCode::PRECONDITION_FAILED,
"Cannot manage failpoints because neon was compiled without failpoints support",

View File

@@ -1,5 +1,5 @@
use anyhow::{Context, Result};
use fail::fail_point;
use neon_failpoint::fail_point;
use tokio_postgres::{Client, Transaction};
use tracing::{error, info};
@@ -40,13 +40,13 @@ impl<'m> MigrationRunner<'m> {
// middle of applying a series of migrations fails in an expected
// manner
if cfg!(feature = "testing") {
let fail = (|| {
fail_point!("compute-migration", |fail_migration_id| {
let fail = async {
fail_point!("compute-migration", |fail_migration_id: Option<String>| {
migration_id == fail_migration_id.unwrap().parse::<i64>().unwrap()
});
false
})();
}.await;
if fail {
return Err(anyhow::anyhow!(format!(