Skip to content

Commit 27e0deb

Browse files
committed
Refactor "throws Exception" in tests
1 parent 911b120 commit 27e0deb

File tree

3 files changed

+305
-305
lines changed

3 files changed

+305
-305
lines changed

postgresql-backend/src/test/java/de/bwaldvogel/mongo/backend/postgresql/PostgresqlBackendTest.java

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static void closeDataSource() {
5757
}
5858

5959
@Override
60-
protected MongoBackend createBackend() throws Exception {
60+
protected MongoBackend createBackend() {
6161
PostgresqlBackend backend = new PostgresqlBackend(dataSource, clock);
6262
for (String db : List.of(TEST_DATABASE_NAME, OTHER_TEST_DATABASE_NAME)) {
6363
MongoDatabase mongoDatabase = backend.openOrCreateDatabase(db);
@@ -68,63 +68,63 @@ protected MongoBackend createBackend() throws Exception {
6868

6969
@Test
7070
@Override
71-
public void testCompoundSparseUniqueIndex() throws Exception {
71+
public void testCompoundSparseUniqueIndex() {
7272
assumeStrictTests();
7373
super.testCompoundSparseUniqueIndex();
7474
}
7575

7676
@Test
7777
@Override
78-
public void testCompoundSparseUniqueIndexOnEmbeddedDocuments() throws Exception {
78+
public void testCompoundSparseUniqueIndexOnEmbeddedDocuments() {
7979
assumeStrictTests();
8080
super.testCompoundSparseUniqueIndexOnEmbeddedDocuments();
8181
}
8282

8383
@Test
8484
@Override
85-
public void testSparseUniqueIndexOnEmbeddedDocument() throws Exception {
85+
public void testSparseUniqueIndexOnEmbeddedDocument() {
8686
assumeStrictTests();
8787
super.testSparseUniqueIndexOnEmbeddedDocument();
8888
}
8989

9090
@Test
9191
@Override
92-
public void testSecondarySparseUniqueIndex() throws Exception {
92+
public void testSecondarySparseUniqueIndex() {
9393
assumeStrictTests();
9494
super.testSecondarySparseUniqueIndex();
9595
}
9696

9797
@Test
9898
@Override
99-
public void testUniqueIndexWithDeepDocuments() throws Exception {
99+
public void testUniqueIndexWithDeepDocuments() {
100100
assumeStrictTests();
101101
super.testUniqueIndexWithDeepDocuments();
102102
}
103103

104104
@Test
105105
@Override
106-
public void testOrderByEmbeddedDocument() throws Exception {
106+
public void testOrderByEmbeddedDocument() {
107107
assumeStrictTests();
108108
super.testOrderByEmbeddedDocument();
109109
}
110110

111111
@Test
112112
@Override
113-
public void testOrderByMissingAndNull() throws Exception {
113+
public void testOrderByMissingAndNull() {
114114
assumeStrictTests();
115115
super.testOrderByMissingAndNull();
116116
}
117117

118118
@Test
119119
@Override
120-
public void testSortDocuments() throws Exception {
120+
public void testSortDocuments() {
121121
assumeStrictTests();
122122
super.testSortDocuments();
123123
}
124124

125125
@Test
126126
@Override
127-
public void testFindAndOrderByWithListValues() throws Exception {
127+
public void testFindAndOrderByWithListValues() {
128128
assumeStrictTests();
129129
super.testFindAndOrderByWithListValues();
130130
}
@@ -138,98 +138,98 @@ public void testSort() {
138138

139139
@Test
140140
@Override
141-
public void testInsertQueryAndSortBinaryTypes() throws Exception {
141+
public void testInsertQueryAndSortBinaryTypes() {
142142
assumeStrictTests();
143143
super.testInsertQueryAndSortBinaryTypes();
144144
}
145145

146146
@Test
147147
@Override
148-
public void testUuidAsId() throws Exception {
148+
public void testUuidAsId() {
149149
assumeStrictTests();
150150
super.testUuidAsId();
151151
}
152152

153153
@Test
154154
@Override
155-
public void testTypeMatching() throws Exception {
155+
public void testTypeMatching() {
156156
assumeStrictTests();
157157
super.testTypeMatching();
158158
}
159159

160160
@Test
161161
@Override
162-
public void testDecimal128() throws Exception {
162+
public void testDecimal128() {
163163
assumeStrictTests();
164164
super.testDecimal128();
165165
}
166166

167167
@Test
168168
@Override
169-
public void testDecimal128_Inc() throws Exception {
169+
public void testDecimal128_Inc() {
170170
assumeStrictTests();
171171
super.testDecimal128_Inc();
172172
}
173173

174174
@Test
175175
@Override
176-
public void testArrayNe() throws Exception {
176+
public void testArrayNe() {
177177
assumeStrictTests();
178178
super.testArrayNe();
179179
}
180180

181181
@Test
182182
@Override
183-
public void testRegExQuery() throws Exception {
183+
public void testRegExQuery() {
184184
assumeStrictTests();
185185
super.testRegExQuery();
186186
}
187187

188188
@Test
189189
@Override
190-
public void testInsertAndFindJavaScriptContent() throws Exception {
190+
public void testInsertAndFindJavaScriptContent() {
191191
assumeStrictTests();
192192
super.testInsertAndFindJavaScriptContent();
193193
}
194194

195195
@Test
196196
@Override
197-
public void testMultikeyIndex_simpleArrayValues() throws Exception {
197+
public void testMultikeyIndex_simpleArrayValues() {
198198
assumeStrictTests();
199199
super.testMultikeyIndex_simpleArrayValues();
200200
}
201201

202202
@Test
203203
@Override
204-
public void testCompoundMultikeyIndex_simpleArrayValues() throws Exception {
204+
public void testCompoundMultikeyIndex_simpleArrayValues() {
205205
assumeStrictTests();
206206
super.testCompoundMultikeyIndex_simpleArrayValues();
207207
}
208208

209209
@Test
210210
@Override
211-
public void testCompoundMultikeyIndex_documents() throws Exception {
211+
public void testCompoundMultikeyIndex_documents() {
212212
assumeStrictTests();
213213
super.testCompoundMultikeyIndex_documents();
214214
}
215215

216216
@Test
217217
@Override
218-
public void testCompoundMultikeyIndex_multiple_document_keys() throws Exception {
218+
public void testCompoundMultikeyIndex_multiple_document_keys() {
219219
assumeStrictTests();
220220
super.testCompoundMultikeyIndex_multiple_document_keys();
221221
}
222222

223223
@Test
224224
@Override
225-
public void testCompoundMultikeyIndex_deepDocuments() throws Exception {
225+
public void testCompoundMultikeyIndex_deepDocuments() {
226226
assumeStrictTests();
227227
super.testCompoundMultikeyIndex_deepDocuments();
228228
}
229229

230230
@Test
231231
@Override
232-
public void testCompoundMultikeyIndex_threeKeys() throws Exception {
232+
public void testCompoundMultikeyIndex_threeKeys() {
233233
assumeStrictTests();
234234
super.testCompoundMultikeyIndex_threeKeys();
235235
}
@@ -243,7 +243,7 @@ public void testEmbeddedSort_arrayOfDocuments() {
243243

244244
@Test
245245
@Override
246-
public void testAddUniqueIndexOnExistingDocuments_violatingUniqueness() throws Exception {
246+
public void testAddUniqueIndexOnExistingDocuments_violatingUniqueness() {
247247
collection.insertOne(json("_id: 1, value: 'a'"));
248248
collection.insertOne(json("_id: 2, value: 'b'"));
249249
collection.insertOne(json("_id: 3, value: 'c'"));
@@ -265,7 +265,7 @@ public void testAddUniqueIndexOnExistingDocuments_violatingUniqueness() throws E
265265

266266
@Test
267267
@Override
268-
public void testUniqueIndexOnArrayField() throws Exception {
268+
public void testUniqueIndexOnArrayField() {
269269
if (isStrictTestsEnabled()) {
270270
super.testUniqueIndexOnArrayField();
271271
} else {
@@ -307,7 +307,7 @@ public void testUniqueIndexOnArrayField() throws Exception {
307307

308308
@Test
309309
@Override
310-
public void testUniqueIndexOnArrayField_updates() throws Exception {
310+
public void testUniqueIndexOnArrayField_updates() {
311311
if (isStrictTestsEnabled()) {
312312
super.testUniqueIndexOnArrayField_updates();
313313
} else {
@@ -344,7 +344,7 @@ public void testUniqueIndexOnArrayField_updates() throws Exception {
344344

345345
@Test
346346
@Override
347-
public void testUniqueIndexOnArrayFieldInSubdocument() throws Exception {
347+
public void testUniqueIndexOnArrayFieldInSubdocument() {
348348
if (isStrictTestsEnabled()) {
349349
super.testUniqueIndexOnArrayFieldInSubdocument();
350350
} else {
@@ -371,20 +371,20 @@ public void testUniqueIndexOnArrayFieldInSubdocument() throws Exception {
371371

372372
@Test
373373
@Override
374-
public void testGetKeyValues_multiKey_document_nested_objects() throws Exception {
374+
public void testGetKeyValues_multiKey_document_nested_objects() {
375375
assumeStrictTests();
376376
super.testGetKeyValues_multiKey_document_nested_objects();
377377
}
378378

379379
@Test
380380
@Override
381-
public void testOldAndNewUuidTypes() throws Exception {
381+
public void testOldAndNewUuidTypes() {
382382
assumeStrictTests();
383383
super.testOldAndNewUuidTypes();
384384
}
385385

386386
@Test
387-
void testUuidDuplicate() throws Exception {
387+
void testUuidDuplicate() {
388388
Document document1 = new Document("_id", UUID.fromString("5542cbb9-7833-96a2-b456-f13b6ae1bc80"));
389389

390390
collection.insertOne(document1);
@@ -406,21 +406,21 @@ void testUuidDuplicate() throws Exception {
406406

407407
@Test
408408
@Override
409-
public void testUpdatePushSlice() throws Exception {
409+
public void testUpdatePushSlice() {
410410
assumeStrictTests();
411411
super.testUpdatePushSlice();
412412
}
413413

414414
@Test
415415
@Override
416-
public void testUpdatePushSortAndSlice() throws Exception {
416+
public void testUpdatePushSortAndSlice() {
417417
assumeStrictTests();
418418
super.testUpdatePushSortAndSlice();
419419
}
420420

421421
@Test
422422
@Override
423-
public void testMinMaxKeyRangeQuery() throws Exception {
423+
public void testMinMaxKeyRangeQuery() {
424424
assumeStrictTests();
425425
super.testMinMaxKeyRangeQuery();
426426
}

0 commit comments

Comments
 (0)