diff --git a/ci/ci.sh b/ci/ci.sh index 73cfa02..475d722 100755 --- a/ci/ci.sh +++ b/ci/ci.sh @@ -11,6 +11,7 @@ if [[ $NODE_ENV == "local_client-public" ]]; then fi if [[ $NODE_ENV == "local_node-private" ]]; then + export DEBUG="knex:*" # init config and generate peer id node_modules/go-ipfs/go-ipfs/ipfs init diff --git a/src/__tests__/indexing.ts b/src/__tests__/indexing.ts index b411f92..658342d 100644 --- a/src/__tests__/indexing.ts +++ b/src/__tests__/indexing.ts @@ -40,7 +40,7 @@ const extractDocuments = ( describe('indexing', () => { describe('Using existing model', () => { - jest.setTimeout(1000 * 60) + jest.setTimeout(1000 * 120) const originalDid = ceramic.did as DID const singleNodeTestCases: any[] = [['ceramic', ceramic]] @@ -58,9 +58,14 @@ describe('indexing', () => { twoNodesTestCases.push(['creating: ceramicClient, loading: ceramic', ceramicClient, ceramic]) } + beforeEach(() => { + console.log(`START: ${expect.getState().currentTestName}`) + }) + afterEach(() => { ceramic.did = originalDid ceramicClient.did = originalDid + console.log(`END: ${expect.getState().currentTestName}`) }) if (singleNodeTestCases.length > 0) { @@ -74,6 +79,10 @@ describe('indexing', () => { { anchor: false } ) + console.log( + `created doc1: streamId -- ${doc1.id.toString()}, tip - ${doc1.tip.toString()} ` + ) + await expect( ceramicInstance.index.count({ model: TEST_MODEL.toString() }) ).resolves.toBeGreaterThanOrEqual(1) @@ -95,6 +104,11 @@ describe('indexing', () => { ) await doc1.replace(DATA2, { anchor: false }) + + console.log( + `replaced doc1: streamId -- ${doc1.id.toString()}, tip - ${doc1.tip.toString()} ` + ) + const doc2 = await ModelInstanceDocument.create( ceramicInstance, DATA3, @@ -102,6 +116,10 @@ describe('indexing', () => { { anchor: false } ) + console.log( + `created doc2: streamId -- ${doc2.id.toString()}, tip - ${doc2.tip.toString()} ` + ) + await TestUtils.delay(5 * 1000) await expect(