Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions yarn-project/p2p/src/service/data_store.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string';

import { AztecDatastore } from './data_store.js';

const CLEANUP_TIMEOUT = 30_000;

describe('AztecDatastore with AztecLmdbStore', () => {
let datastore: AztecDatastore;
let aztecStore: AztecLmdbStore;
Expand Down Expand Up @@ -177,7 +179,7 @@ export function interfaceDatastoreTests<D extends Datastore = Datastore>(test: I

afterEach(async () => {
await cleanup(store);
});
}, CLEANUP_TIMEOUT);

it('simple', async () => {
const k = new Key('/z/key');
Expand Down Expand Up @@ -213,7 +215,7 @@ export function interfaceDatastoreTests<D extends Datastore = Datastore>(test: I

afterEach(async () => {
await cleanup(store);
});
}, CLEANUP_TIMEOUT);

it('streaming', async () => {
const data: Pair[] = [];
Expand Down Expand Up @@ -244,7 +246,7 @@ export function interfaceDatastoreTests<D extends Datastore = Datastore>(test: I

afterEach(async () => {
await cleanup(store);
});
}, CLEANUP_TIMEOUT);

it('simple', async () => {
const k = new Key('/z/one');
Expand Down Expand Up @@ -274,7 +276,7 @@ export function interfaceDatastoreTests<D extends Datastore = Datastore>(test: I

afterEach(async () => {
await cleanup(store);
});
}, CLEANUP_TIMEOUT);

it('streaming', async () => {
const k = new Key('/z/one');
Expand Down Expand Up @@ -308,7 +310,7 @@ export function interfaceDatastoreTests<D extends Datastore = Datastore>(test: I

afterEach(async () => {
await cleanup(store);
}, 10_000);
}, CLEANUP_TIMEOUT);

it('simple', async () => {
const k = new Key('/z/one');
Expand Down Expand Up @@ -354,7 +356,7 @@ export function interfaceDatastoreTests<D extends Datastore = Datastore>(test: I

afterEach(async () => {
await cleanup(store);
});
}, CLEANUP_TIMEOUT);

it('streaming', async () => {
const data = [];
Expand Down Expand Up @@ -390,7 +392,7 @@ export function interfaceDatastoreTests<D extends Datastore = Datastore>(test: I

afterEach(async () => {
await cleanup(store);
});
}, CLEANUP_TIMEOUT);

it('simple', async () => {
const b = store.batch();
Expand Down Expand Up @@ -481,7 +483,7 @@ export function interfaceDatastoreTests<D extends Datastore = Datastore>(test: I

afterAll(async () => {
await cleanup(store);
});
}, CLEANUP_TIMEOUT);

tests.forEach(([name, query, expected]) =>
it(name, async () => {
Expand Down Expand Up @@ -604,7 +606,7 @@ export function interfaceDatastoreTests<D extends Datastore = Datastore>(test: I

afterAll(async () => {
await cleanup(store);
});
}, CLEANUP_TIMEOUT);

tests.forEach(([name, query, expected]) =>
it(name, async () => {
Expand Down