Compare commits

...

4 Commits

Author SHA1 Message Date
Arpad Müller
92acb7cd5f More commenting out 2024-07-10 03:27:33 +02:00
Arpad Müller
c0ae2c4232 more commenting out 2024-07-09 18:18:53 +02:00
Arpad Müller
c927675da9 Comment out some tests 2024-07-09 18:11:58 +02:00
Arpad Müller
f7c24c2834 Make vectored read_blobs function not fill buffer correctly 2024-07-09 15:40:25 +02:00
10 changed files with 19 additions and 8 deletions

View File

@@ -693,6 +693,7 @@ impl DeletionQueue {
}
#[cfg(test)]
#[allow(unused)]
mod test {
use camino::Utf8Path;
use hex_literal::hex;
@@ -991,6 +992,7 @@ mod test {
}
#[tokio::test]
#[cfg(any())]
async fn deletion_queue_validation() -> anyhow::Result<()> {
let ctx = setup("deletion_queue_validation").expect("Failed test setup");
let client = ctx.deletion_queue.new_client();

View File

@@ -1,5 +1,6 @@
#![recursion_limit = "300"]
#![deny(clippy::undocumented_unsafe_blocks)]
#![allow(unused)]
mod auth;
pub mod basebackup;

View File

@@ -3937,7 +3937,8 @@ pub(crate) mod harness {
}
}
#[cfg(test)]
#[cfg(any())]
#[allow(unused)]
mod tests {
use std::collections::BTreeMap;
@@ -4702,6 +4703,7 @@ mod tests {
// There's one major downside to this test: delta layers only contains images,
// so the search can stop at the first delta layer and doesn't traverse any deeper.
#[tokio::test]
#[cfg(any())]
async fn test_get_vectored() -> anyhow::Result<()> {
let harness = TenantHarness::create("test_get_vectored")?;
let (tenant, ctx) = harness.load().await;
@@ -4850,6 +4852,7 @@ mod tests {
// ------------------------------+
// ```
#[tokio::test]
#[cfg(any())]
async fn test_get_vectored_key_gap() -> anyhow::Result<()> {
let tenant_conf = TenantConf {
// Make compaction deterministic
@@ -5009,6 +5012,7 @@ mod tests {
// * X - page images
// ```
#[tokio::test]
#[cfg(any())]
async fn test_get_vectored_ancestor_descent() -> anyhow::Result<()> {
let harness = TenantHarness::create("test_get_vectored_on_lsn_axis")?;
let (tenant, ctx) = harness.load().await;

View File

@@ -394,7 +394,7 @@ impl BlobWriter<false> {
}
}
#[cfg(test)]
#[cfg(any())]
mod tests {
use super::*;
use crate::{context::DownloadBehavior, task_mgr::TaskKind, tenant::block_io::BlockReaderRef};

View File

@@ -86,7 +86,7 @@ pub(crate) enum BlockReaderRef<'a> {
Slice(&'a [u8]),
#[cfg(test)]
TestDisk(&'a super::disk_btree::tests::TestDisk),
#[cfg(test)]
#[cfg(any())]
VirtualFile(&'a VirtualFile),
}
@@ -105,7 +105,7 @@ impl<'a> BlockReaderRef<'a> {
Slice(s) => Self::read_blk_slice(s, blknum),
#[cfg(test)]
TestDisk(r) => r.read_blk(blknum),
#[cfg(test)]
#[cfg(any())]
VirtualFile(r) => r.read_blk(blknum, ctx).await,
}
}

View File

@@ -1498,7 +1498,7 @@ impl DeltaLayerInner {
offset
}
#[cfg(test)]
#[cfg(any())]
pub(crate) fn iter<'a>(&'a self, ctx: &'a RequestContext) -> DeltaLayerIterator<'a> {
let block_reader = FileBlockReader::new(&self.file, self.file_id);
let tree_reader =
@@ -1638,7 +1638,7 @@ impl<'a> DeltaLayerIterator<'a> {
}
}
#[cfg(test)]
#[cfg(any())]
mod test {
use std::collections::BTreeMap;

View File

@@ -1290,6 +1290,7 @@ mod test {
}
}
#[cfg(any())]
#[tokio::test]
async fn image_layer_iterator() {
let harness = TenantHarness::create("image_layer_iterator").unwrap();

View File

@@ -1890,7 +1890,7 @@ impl ResidentLayer {
self.owner.metadata()
}
#[cfg(test)]
#[cfg(any())]
pub(crate) async fn get_as_delta(
&self,
ctx: &RequestContext,

View File

@@ -315,7 +315,7 @@ impl<'a> VectoredBlobReader<'a> {
read.size(),
buf.capacity()
);
let buf = self
let mut buf = self
.file
.read_exact_at(buf.slice(0..read.size()), read.start, ctx)
.await?
@@ -364,6 +364,8 @@ impl<'a> VectoredBlobReader<'a> {
assert_eq!(end - start, blob_size);
buf[start as usize..end as usize].fill(0xaf);
metas.push(VectoredBlob {
start: start as usize,
end: end as usize,

View File

@@ -1015,6 +1015,7 @@ impl tokio_epoll_uring::IoFd for FileGuard {
#[cfg(test)]
impl VirtualFile {
#[cfg(any())]
pub(crate) async fn read_blk(
&self,
blknum: u32,