11import {
2- DisableIndexOperation ,
3- GetIndexStatisticsOperation ,
4- IDocumentStore
2+ IDocumentStore , StopIndexOperation
53} from "../../../src" ;
64import { disposeTestDocumentStore , testContext } from "../../Utils/TestUtil" ;
75import { 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