@@ -96,9 +96,9 @@ void luceneIndexScrubMissingDataModelNoIssues(boolean isSynthetic, boolean isGro
96
96
dataModel .saveRecords (3 , i * 1007 , context , i / 6 );
97
97
context .commit ();
98
98
}
99
- try ( final FDBRecordContext context = openContext ()) {
100
- dataModel . explicitMergeIndex ( context , timer );
101
- }
99
+ }
100
+ try ( final FDBRecordContext context = openContext ()) {
101
+ dataModel . explicitMergeIndex ( context , timer );
102
102
}
103
103
try (final FDBRecordContext context = openContext ()) {
104
104
FDBRecordStore store = dataModel .createOrOpenRecordStore (context );
@@ -179,34 +179,36 @@ void luceneIndexScrubMissingDataModel(boolean isSynthetic, boolean isGrouped, bo
179
179
dataModel .saveRecords (3 , i * 1007 , context , i / 6 );
180
180
context .commit ();
181
181
}
182
- try ( final FDBRecordContext context = openContext ()) {
183
- dataModel . explicitMergeIndex ( context , timer );
184
- }
182
+ }
183
+ try ( final FDBRecordContext context = openContext ()) {
184
+ dataModel . explicitMergeIndex ( context , timer );
185
185
}
186
186
187
187
try (final FDBRecordContext context = openContext ()) {
188
188
// Write some documents
189
189
dataModel .saveRecords (7 , 10 , context , 1 );
190
190
dataModel .saveRecords (7 , 20 , context , 2 );
191
191
dataModel .saveRecords (7 , 30 , context , 3 );
192
+ }
193
+
194
+ try (final FDBRecordContext context = openContext ()) {
195
+ dataModel .explicitMergeIndex (context , timer );
196
+ }
197
+
198
+ try (final FDBRecordContext context = openContext ()) {
199
+ dataModel .saveRecords (7 , 40 , context , 1 );
200
+ dataModel .saveRecords (7 , 50 , context , 2 );
192
201
// Write few more records without updating
193
202
injectedFailures .setFlag (LUCENE_MAINTAINER_SKIP_INDEX_UPDATE );
203
+ dataModel .saveRecords (5 , 90 , context , 4 );
194
204
dataModel .saveRecords (3 , 10 , context , 1 );
195
205
dataModel .saveRecords (2 , 20 , context , 3 );
196
206
injectedFailures .setFlag (LUCENE_MAINTAINER_SKIP_INDEX_UPDATE , false );
207
+ context .commit ();
208
+ }
197
209
198
- dataModel .saveRecords (7 , 40 , context , 1 );
199
- dataModel .saveRecords (7 , 50 , context , 2 );
210
+ try (final FDBRecordContext context = openContext ()) {
200
211
dataModel .explicitMergeIndex (context , timer );
201
-
202
- injectedFailures .setFlag (LUCENE_MAINTAINER_SKIP_INDEX_UPDATE );
203
- dataModel .saveRecords (5 , 20 , context , 4 );
204
- injectedFailures .setFlag (LUCENE_MAINTAINER_SKIP_INDEX_UPDATE , false );
205
-
206
- dataModel .saveRecords (7 , 60 , context , 3 );
207
-
208
-
209
- context .commit ();
210
212
}
211
213
212
214
try (final FDBRecordContext context = openContext ()) {
0 commit comments