mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 01:12:56 +00:00
Pass test
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use bytes::Bytes;
|
||||
use std::{
|
||||
fs::File,
|
||||
fs::{create_dir_all, File},
|
||||
io::{BufWriter, Write},
|
||||
path::PathBuf,
|
||||
};
|
||||
@@ -17,6 +17,9 @@ impl Drop for Tracer {
|
||||
|
||||
impl Tracer {
|
||||
pub fn new(path: PathBuf) -> Self {
|
||||
let parent = path.parent().expect("failed to parse parent path");
|
||||
create_dir_all(parent).expect("failed to create trace dir");
|
||||
|
||||
let file = File::create(path).expect("failed to create trace file");
|
||||
Tracer {
|
||||
writer: BufWriter::new(file),
|
||||
|
||||
@@ -10,3 +10,10 @@ def test_trace_replay(neon_env_builder: NeonEnvBuilder):
|
||||
"trace_read_requests": "true",
|
||||
}
|
||||
)
|
||||
timeline = env.neon_cli.create_timeline("test_trace_replay", tenant_id=tenant)
|
||||
pg = env.postgres.create_start("test_trace_replay", "main", tenant)
|
||||
|
||||
pg.safe_psql("select 1;")
|
||||
|
||||
trace_path = env.repo_dir / "traces" / str(tenant) / str(timeline) / str(timeline)
|
||||
assert trace_path.exists()
|
||||
|
||||
Reference in New Issue
Block a user