Skip to content

Commit 0a600e2

Browse files
committed
merge
2 parents 23cd54a + d88e48b commit 0a600e2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/t_basic/DefaultValuesTest.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
*/
2020
"use strict";
2121

22+
var udebug = unified_debug.getLogger("test/t_basic/DefaultValuesTest.js");
23+
2224
/***** Persist with domain object ***/
2325
var t1 = new harness.SerialTest("testPersistDomainObjectDefaultNameAndAge");
2426
t1.run = function() {
@@ -157,6 +159,8 @@ t6.run = function() {
157159
session.persist(object, function(err, session2) {
158160
if (!err) {
159161
testCase.appendErrorMessage('t6 Expected error not received for not null no default undefined');
162+
} else {
163+
udebug.log('t6 Expected error received:', err);
160164
}
161165
testCase.failOnError();
162166
}, session);
@@ -167,13 +171,16 @@ t6.run = function() {
167171
var t7 = new harness.SerialTest("testPersistDomainObjectNotNullNoDefaultNull");
168172
t7.run = function() {
169173
var testCase = this;
170-
// create the domain object 4176 with no magic; must fail
174+
// create the domain object 4176 with magic null; must fail
171175
var object = new global.t_basic(4176);
172176
object.magic = null;
173177
fail_openSession(testCase, function(session) {
174178
session.persist(object, function(err, session2) {
175179
if (!err) {
176-
testCase.appendErrorMessage('t6 Expected error not received for not null no default null');
180+
testCase.appendErrorMessage('t7 Expected error not received for not null no default null');
181+
} else {
182+
testCase.errorIfNotEqual('t7 Wrong sqlstate', '23000', err.sqlstate);
183+
udebug.log('t7 Expected error received:', err);
177184
}
178185
testCase.failOnError();
179186
}, session);

0 commit comments

Comments
 (0)