Forum OpenACS Q&A: Automated Testing acs_message_new

Collapse
Posted by Hamilton Chua on
Hello,

I am testing a procedure which utilizes acs_messages particularly the acs_message__new.

Although this proc works correctly when run in the web application it always fails automated testing.

This is what shows in the log files when automated testing runs my test script:

FAILED

12/Jun/2004:06:10:48: Aborting transaction due to error:
Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.")

ERROR:  null value in column "tree_sortkey" violates not-null constraint
CONTEXT:  PL/pgSQL function "acs_object__new" line 24 at SQL statement
PL/pgSQL function "content_item__new" line 76 at assignment
PL/pgSQL function "acs_message__new" line 50 at assignment

It seems that it's not only my script that's failing, some other test scripts in acs-tcl particularly the one that utilizes acs_message__new also fail.

Would anybody know why the tree_sortkey is not created when acs_object__new is called from acs_messaging__new inside a test script ?

Could it bee too manu db_transactions ?

Thanks

Collapse
Posted by Hamilton Chua on
I forgot to add my setup information :

AOLServer 4.0
Postgresql 7.4
OpenACS 5.1 (stock Tar ball)