@@ -61,7 +61,6 @@ public void cleanupData(SessionFactoryScope scope) {
61
61
}
62
62
63
63
@ Test
64
- @ SkipForDialect ( dialectClass = GaussDBDialect .class , reason = "type:resolving.syntax error at or near \" conflict do\" " )
65
64
public void testOnConflictDoNothing (SessionFactoryScope scope ) {
66
65
scope .inTransaction (
67
66
session -> {
@@ -86,7 +85,6 @@ public void testOnConflictDoNothing(SessionFactoryScope scope) {
86
85
87
86
@ Test
88
87
@ RequiresDialectFeature (feature = DialectFeatureChecks .SupportsUpsertOrMerge .class )
89
- @ SkipForDialect ( dialectClass = GaussDBDialect .class , reason = "type:resolving.syntax error at or near \" conflict(\" " )
90
88
public void testOnConflictDoUpdate (SessionFactoryScope scope ) {
91
89
scope .inTransaction (
92
90
session -> {
@@ -114,7 +112,6 @@ public void testOnConflictDoUpdate(SessionFactoryScope scope) {
114
112
115
113
@ Test
116
114
@ RequiresDialectFeature (feature = DialectFeatureChecks .SupportsUpsertOrMerge .class )
117
- @ SkipForDialect ( dialectClass = GaussDBDialect .class , reason = "type:resolving.syntax error at or near \" conflict(" )
118
115
public void testOnConflictDoUpdateWithWhere (SessionFactoryScope scope ) {
119
116
scope .inTransaction (
120
117
session -> {
@@ -134,6 +131,10 @@ else if ( scope.getSessionFactory().getJdbcServices().getDialect() instanceof Sy
134
131
// Sybase seems to report all matched rows as affected and ignores additional predicates
135
132
assertEquals ( 1 , updated );
136
133
}
134
+ else if ( scope .getSessionFactory ().getJdbcServices ().getDialect () instanceof GaussDBDialect ) {
135
+ // GaussDB seems to report all matched rows as affected and ignores additional predicates
136
+ assertEquals ( 1 , updated );
137
+ }
137
138
else {
138
139
assertEquals ( 0 , updated );
139
140
}
@@ -145,7 +146,6 @@ else if ( scope.getSessionFactory().getJdbcServices().getDialect() instanceof Sy
145
146
146
147
@ Test
147
148
@ RequiresDialectFeature (feature = DialectFeatureChecks .SupportsUpsertOrMerge .class )
148
- @ SkipForDialect ( dialectClass = GaussDBDialect .class , reason = "type:resolving.syntax error at or near \" conflict(" )
149
149
public void testOnConflictDoUpdateWithWhereCriteria (SessionFactoryScope scope ) {
150
150
scope .inTransaction (
151
151
session -> {
@@ -171,6 +171,10 @@ else if ( scope.getSessionFactory().getJdbcServices().getDialect() instanceof Sy
171
171
// Sybase seems to report all matched rows as affected and ignores additional predicates
172
172
assertEquals ( 1 , updated );
173
173
}
174
+ else if ( scope .getSessionFactory ().getJdbcServices ().getDialect () instanceof GaussDBDialect ) {
175
+ // GaussDB seems to report all matched rows as affected and ignores additional predicates
176
+ assertEquals ( 1 , updated );
177
+ }
174
178
else {
175
179
assertEquals ( 0 , updated );
176
180
}
@@ -181,7 +185,6 @@ else if ( scope.getSessionFactory().getJdbcServices().getDialect() instanceof Sy
181
185
}
182
186
183
187
@ Test
184
- @ SkipForDialect ( dialectClass = GaussDBDialect .class , reason = "type:resolving.syntax error at or near \" conflict do\" " )
185
188
public void testOnConflictDoNothingMultiTable (SessionFactoryScope scope ) {
186
189
scope .inTransaction (
187
190
session -> {
@@ -209,7 +212,6 @@ public void testOnConflictDoNothingMultiTable(SessionFactoryScope scope) {
209
212
@ Test
210
213
@ RequiresDialectFeature (feature = DialectFeatureChecks .SupportsUpsertOrMerge .class )
211
214
@ SkipForDialect (dialectClass = SybaseASEDialect .class , reason = "MERGE into a table that has a self-referential FK does not work" )
212
- @ SkipForDialect ( dialectClass = GaussDBDialect .class , reason = "type:resolving.syntax error at or near \" conflict(" )
213
215
public void testOnConflictDoUpdateMultiTable (SessionFactoryScope scope ) {
214
216
scope .inTransaction (
215
217
session -> {
@@ -238,7 +240,6 @@ public void testOnConflictDoUpdateMultiTable(SessionFactoryScope scope) {
238
240
@ Test
239
241
@ RequiresDialectFeature (feature = DialectFeatureChecks .SupportsUpsertOrMerge .class )
240
242
@ SkipForDialect (dialectClass = SybaseASEDialect .class , reason = "MERGE into a table that has a self-referential FK does not work" )
241
- @ SkipForDialect ( dialectClass = GaussDBDialect .class , reason = "syntax error at or near \" conflict(\" " )
242
243
public void testOnConflictDoUpdateWithWhereMultiTable (SessionFactoryScope scope ) {
243
244
scope .inTransaction (
244
245
session -> {
@@ -258,6 +259,10 @@ else if ( scope.getSessionFactory().getJdbcServices().getDialect() instanceof Sy
258
259
// Sybase seems to report all matched rows as affected and ignores additional predicates
259
260
assertEquals ( 1 , updated );
260
261
}
262
+ else if ( scope .getSessionFactory ().getJdbcServices ().getDialect () instanceof GaussDBDialect ) {
263
+ // GaussDB seems to report all matched rows as affected and ignores additional predicates
264
+ assertEquals ( 1 , updated );
265
+ }
261
266
else {
262
267
assertEquals ( 0 , updated );
263
268
}
0 commit comments