feature/docker-orchestrator-tests #3

Merged
lentil merged 10 commits from feature/docker-orchestrator-tests into main 2025-06-19 16:59:08 -05:00
5 changed files with 7 additions and 15 deletions
Showing only changes of commit 87699dd1af - Show all commits

View File

@ -17,7 +17,7 @@ describe('Run', () => {
apps[0].config.seedPeers.push(apps[1].myRequestAddr);
apps[1].config.seedPeers.push(apps[0].myRequestAddr);
await Promise.all(apps.map((app) => app.start({ waitForReady: false })));
await Promise.all(apps.map((app) => app.start()));
});
afterAll(async () => {

View File

@ -83,16 +83,13 @@ export class RhizomeNode {
/**
* Start the node components
* @param options.startupOptions Options for node startup
* @param options.waitForReady Whether to wait for all components to be fully ready (default: false)
* @param options.syncOnStart Whether to sync with peers on startup (default: false)
* @returns Promise that resolves when the node is started (and ready if waitForReady is true)
* @returns Promise that resolves when the node is fully started and ready
*/
async start({
waitForReady = false,
syncOnStart = false
}: { waitForReady?: boolean; syncOnStart?: boolean } = {}): Promise<void> {
debug(`[${this.config.peerId}]`, `Starting node${waitForReady ? ' (waiting for ready)' : ''}...`);
}: { syncOnStart?: boolean } = {}): Promise<void> {
debug(`[${this.config.peerId}]`, 'Starting node (waiting for ready)...');
// Connect our lossless view to the delta stream
this.deltaStream.subscribeDeltas(async (delta) => {
@ -115,11 +112,7 @@ export class RhizomeNode {
// Start HTTP server if enabled
if (this.config.httpEnable && this.httpServer) {
if (waitForReady) {
await this.httpServer.startAndWait();
} else {
this.httpServer.start();
}
}
// Initialize network components
@ -132,7 +125,7 @@ export class RhizomeNode {
await new Promise((resolve) => setTimeout(resolve, 1000));
}
debug(`[${this.config.peerId}]`, `Node started${waitForReady ? ' and ready' : ''}`);
debug(`[${this.config.peerId}]`, 'Node started and ready');
}
async stop() {

View File

@ -61,7 +61,7 @@ export class TestOrchestrator extends BaseOrchestrator {
// Start the node and wait for all components to be ready
debug(`[${nodeId}] Starting node and waiting for it to be fully ready...`);
try {
await node.start({ waitForReady: true });
await node.start();
debug(`[${nodeId}] Node is fully started and ready`);
} catch (error) {
debug(`[${nodeId}] Error starting node:`, error);

View File

@ -172,7 +172,6 @@ export class Lossless {
viewSpecific(entityId: DomainEntityID, deltaIds: DeltaID[], deltaFilter?: DeltaFilter): LosslessViewOne | undefined {
const combinedFilter = (delta: Delta) => {
if (!deltaIds.includes(delta.id)) {
debug(`[${this.rhizomeNode.config.peerId}]`, `Excluding delta ${delta.id} because it's not in the requested list of deltas`);
return false;
}
if (!deltaFilter) return true;