File tree 4 files changed +7
-9
lines changed
test/java/com/siriusxi/ms/store/ps
recommendation-service/src
test/java/com/siriusxi/ms/store/rs
4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 6
6
host : localhost
7
7
port : 27017
8
8
database : product-db
9
-
9
+ auto-index-creation : true
10
+
10
11
server :
11
12
port : 9081
12
13
@@ -39,4 +40,4 @@ spring:
39
40
host : mongodb
40
41
41
42
server :
42
- port : 8080
43
+ port : 8080
Original file line number Diff line number Diff line change 4
4
import com .siriusxi .ms .store .ps .persistence .ProductRepository ;
5
5
import org .junit .jupiter .api .Assertions ;
6
6
import org .junit .jupiter .api .BeforeEach ;
7
- import org .junit .jupiter .api .Disabled ;
8
7
import org .junit .jupiter .api .Test ;
9
8
import org .springframework .beans .factory .annotation .Autowired ;
10
9
import org .springframework .boot .test .autoconfigure .data .mongo .DataMongoTest ;
@@ -76,9 +75,7 @@ public void getByProductId() {
76
75
assertEqualsProduct (savedEntity , entity .get ());
77
76
}
78
77
79
- //FIXME error which is not thrown
80
78
@ Test
81
- @ Disabled
82
79
public void duplicateError () {
83
80
84
81
Assertions .assertThrows (
Original file line number Diff line number Diff line change 6
6
host : localhost
7
7
port : 27017
8
8
database : recommendation-db
9
+ auto-index-creation : true
9
10
10
11
server :
11
12
port : 9082
Original file line number Diff line number Diff line change 1
1
package com .siriusxi .ms .store .rs ;
2
2
3
- import com . mongodb . DuplicateKeyException ;
3
+
4
4
import com .siriusxi .ms .store .rs .persistence .RecommendationEntity ;
5
5
import com .siriusxi .ms .store .rs .persistence .RecommendationRepository ;
6
6
import org .junit .jupiter .api .Assertions ;
7
7
import org .junit .jupiter .api .BeforeEach ;
8
- import org .junit .jupiter .api .Disabled ;
9
8
import org .junit .jupiter .api .Test ;
10
9
import org .springframework .beans .factory .annotation .Autowired ;
11
10
import org .springframework .boot .test .autoconfigure .data .mongo .DataMongoTest ;
11
+ import org .springframework .dao .DuplicateKeyException ;
12
12
import org .springframework .dao .OptimisticLockingFailureException ;
13
13
14
14
import java .util .List ;
@@ -73,9 +73,8 @@ public void getByProductId() {
73
73
assertEqualsRecommendation (savedEntity , entityList .get (0 ));
74
74
}
75
75
76
- //FIXME error which is not thrown
76
+
77
77
@ Test
78
- @ Disabled
79
78
public void duplicateError () {
80
79
81
80
Assertions .assertThrows (DuplicateKeyException .class ,
You can’t perform that action at this time.
0 commit comments