Skip to content

Commit 8f1a9d4

Browse files
committed
RDBC-585 fix java/node.js tests after RavenDB-18688 Disabled indexes shouldn't count when using WaitForIndexesAfterSaveChanges
1 parent 7db833e commit 8f1a9d4

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

test/Ported/Issues/RavenDB_15497.ts

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import {
2-
DisableIndexOperation,
3-
GetIndexStatisticsOperation,
4-
IDocumentStore
2+
IDocumentStore, StopIndexOperation
53
} from "../../../src";
64
import { disposeTestDocumentStore, testContext } from "../../Utils/TestUtil";
75
import { assertThat, assertThrows } from "../../Utils/AssertExtensions";
@@ -23,15 +21,6 @@ describe("RavenDB_15497", function () {
2321
const index = new Index();
2422
await index.execute(store);
2523

26-
await store.maintenance.send(new DisableIndexOperation(index.getIndexName()));
27-
28-
const indexStats = await store.maintenance.send(new GetIndexStatisticsOperation(index.getIndexName()));
29-
30-
assertThat(indexStats.state)
31-
.isEqualTo("Disabled");
32-
assertThat(indexStats.status)
33-
.isEqualTo("Disabled");
34-
3524
{
3625
const session = store.openSession();
3726
const user = new User();
@@ -47,6 +36,10 @@ describe("RavenDB_15497", function () {
4736
await session.saveChanges();
4837
}
4938

39+
await testContext.waitForIndexing(store);
40+
41+
await store.maintenance.send(new StopIndexOperation(index.getIndexName()));
42+
5043
{
5144
const session = store.openSession();
5245
const user = new User();
@@ -65,7 +58,7 @@ describe("RavenDB_15497", function () {
6558
assertThat(e.message)
6659
.contains("System.TimeoutException");
6760
assertThat(e.message)
68-
.contains("could not verify that 1 indexes has caught up with the changes as of etag");
61+
.contains("could not verify that");
6962
});
7063
}
7164
});
@@ -82,4 +75,4 @@ class Index extends AbstractJavaScriptIndexCreationTask<User, Pick<User, "name">
8275
}
8376
});
8477
}
85-
}
78+
}

0 commit comments

Comments
 (0)