Forum OpenACS Development: Bug Stomp (10th-11th august), join!

This one will focus as well on acs-tcl, this time adding new tests, plus we might go into another acs-core package to update / fix automated tests.

The goal is to achieve higher Quality Assurance of our core system, in benefit for all the our applications we built atop of OpenACS.

So, acs-tcl is the first objective, lets make all the actual test pass, please sign up (posting in this message), which test case you'll be working on, and update us through the test and/or IRC (https://openacs.org/irc/)

Then, acs-tcl, we need help on having to pass this tests:
ad_proc_fire_callback
datamodel__named_constraints
datamodel__acs_object_type_check
ad_html_security_check_href_allowed
whos_online__check_online_visibility (seems to be twt, but is not marked as that, will ask Juan Pablo to fix that)

Plus, we might possibly need new tests on these ones:
acs_object::
ad_context_bar*
ad_page_contract*
ad_set_cookie
ad_progress_bar*
apm_package*
apm_parameter_register
apm_package_instance_new

Choose among the test we've listed, but you as well can suggest a new test that we might be missing.

We are working on fresh installs of HEAD!
The people who has PG, test on that, the ones with Oracle test on that, though a given test must pass in both since 5.3.x series will still support oracle!

Reference of previous bug-stomp's:
https://openacs.org/forums/message-view?message%5fid=467207
https://openacs.org/forums/message-view?message%5fid=461630

Collapse
Posted by Emmanuelle Raffenne on

Tests results on Oracle server:

Package key Testcases run Passes Fails Result
acs-admin 2 3 0 OK
acs-api-browser 1 1 0 OK
acs-authentication 24 228 1 FAILED
acs-automated-testing 1 0 0 OK
acs-content-repository 7 39 1 FAILED
acs-lang 15 357 0 OK
acs-mail 1 2 0 OK
acs-messaging 2 2 0 OK
acs-service-contract 1 1 0 OK
acs-subsite 3 3 1 FAILED
acs-tcl 53 301 96 FAILED
acs-templating 6 41 10 FAILED

Compared to results posted by Nick, there's more.

Few tests failed because queries syntax are not compatible with Oracle. We start working on those to fix the oracle part:

db__caching
SQL: select first_names from persons limit !>>>!0, stack trace: 
nsoracle.c:3904:ora_tcl_command: error in `OCIStmtExecute ()':
 ORA-00933: SQL command not properly ended

SQL: select first_names from persons limit !>>>!0
    while executing
"ns_ora 0or1row nsdb0 {select first_names from persons limit 0}"
datamodel__acs_object_type_check
Type acs_object: select object_id from acs_objects failed:
nsoracle.c:3904:ora_tcl_command: error in `OCIStmtExecute ()':
 ORA-00911: invalid character

SQL: select object_id as !>>>!__pk from acs_objects limit 1
datamodel__acs_attribute_check
SQL: select a.*, lower(ot.table_name) as obj_type_table 
     from acs_attributes a, acs_object_types ot 
     where ot.object_type = a.object_type 
     order by !>>>!object_type, stack trace: 
nsoracle.c:3904:ora_tcl_command: error in `OCIStmtExecute ()':
 ORA-00918: column ambiguously defined
process_objects_csv
process_objects_csv (body 0): Error during execution: 
Setup failed with error nsoracle.c:3542:ora_tcl_command: error in `OCIStmtExecute ()':
 ORA-06550: line 4, column 13:
PLS-00306: wrong number or types of arguments in call to 'NEW'
ORA-06550: line 4, column 7:
PL/SQL: Statement ignored

SQL: 
      
    BEGIN
      :1 := person.new(creation_user    => :creation_user,
                                   creation_ip      => :creation_ip,
                                   first_names      => :first_names,
                                   last_name        => :last_name
      );
    END; 
Collapse
Posted by Raúl Morales Hidalgo on
Hi there!,

I'm going to try to pass the tests on ad_proc_fire_callback on the oracle test server that Emmanuelle posted.

Collapse
Posted by Emmanuelle Raffenne on
Here are work done and results for tests on Oracle:

db__caching: we substitute "limit 0" for "where person_id=1 and person_id=2". Results: http://openacs.innova.uned.es/test/admin/testcase?testcase_id=db__caching&package_key=acs-tcl&view_by=testcase&category=&quiet=0

datamodel__acs_object_type_check: we changed the variable name "__pk" to "the_pk". Results: http://openacs.innova.uned.es/test/admin/testcase?testcase_id=datamodel__acs_object_type_check&package_key=acs-tcl&view_by=testcase&category=&quiet=0

datamodel__acs_attribute_check: we changed "order by object_type" to "order by a.object_type". Results: http://openacs.innova.uned.es/test/admin/testcase?testcase_id=datamodel__acs_attribute_check&package_key=acs-tcl&view_by=testcase&category=&quiet=0

Now we will add missing types in the array (added types are between * *):

array set allow_types {
string {TEXT VARCHAR CHAR *VARCHAR2*}
boolean {BOOL INT2 INT4 *CHAR*}
number {NUMERIC INT2 INT4 INT8 FLOAT4 FLOAT8 *NUMBER*}
integer {INT2 INT4 INT8 *NUMBER*}
money {NUMERIC FLOAT4 FLOAT8}
timestamp {TIMESTAMPTZ}
time_of_day {TIMESTAMPTZ}
enumeration {INT2 INT4 INT8}
url {VARCHAR TEXT *VARCHAR2*}
email {VARCHAR TEXT *VARCHAR2*}
text {VARCHAR TEXT CLOB *VARCHAR2*}
keyword {CHAR VARCHAR TEXT *VARCHAR2*}
}

However we don't know what to do with timestamp type. On Oracle timestamp corresponds to the "date" datatype but on postgresql date and timestamp are different datatypes. Any idea will be wellcome.

process_objects_csv: person.new() requires "email" input arg . We added the email field in the csv file. Results: http://openacs.innova.uned.es/test/admin/testcase?testcase_id=process_objects_csv&package_key=acs-tcl&view_by=testcase&category=&quiet=0

If there is no objection, I will commit those fixes.

ad_proc_fire_callback: the callback proc doesn't have the "-arg1" switch before arguments, we simply removed that switch. Results: http://openacs.innova.uned.es/test/admin/testcase?testcase_id=ad_proc_fire_callback&package_key=acs-tcl&view_by=testcase&category=&quiet=0

I'm going to try to fix Test case ad_html_security_check_href_allowed now

Forget the above message, I wasn't testing as I should :)
I am going to work in Test Cases for ad_set_cookie, I will post what features I tested.
I have tested the following procs:

1. ad_set_cookie
2. ad_get_cookie
3. ad_set_cookie with the parameters -replace and-max_age.

All above procs are working fine.

The name of the file is: test-set-cookie-procs.tcl which is committed in HEAD :)

Collapse
Posted by Juan Pablo Amaya on
I want to test the ad_context_bar procs.
Collapse
Posted by Emmanuelle Raffenne on
I'm starting with datamodel__named_constraints, coding the missing oracle part.
Collapse
Posted by Emmanuelle Raffenne on
Oracle code and fixes for:

datamodel__named_constraint
datamodel__acs_object_type_check
datamodel__acs_attribute_check
process_objects_csv
db__caching

have been committed. Please test on postgresql.

Collapse
Posted by Raúl Morales Hidalgo on
We have fixed ad_proc_fire_callback (a missing "-" in the a_callback creation didn't create arg1 as a switch.
Results: http://openacs.innova.uned.es/test/admin/testcase?testcase_id=ad_proc_fire_callback&package_key=acs-tcl&view_by=testcase&category=&quiet=0

However further testing will be apreciated as some weird results appear in the "callback returns value for each defined callback and catches the error callback" test although it does work ok.

We've also fixed community-core-procs-oracle.xql delete_person query, which was wrong.

Emmannuelle will commit the changes.

We're starting to create test cases for apm_parameter_register also, I will post when done.

Collapse
Posted by Emmanuelle Raffenne on
Everything committed. Thanks Raul.

We reran tests for acs-tcl, there are 3 that failed on Oracle:

datamodel__named_constraints

datamodel__acs_object_type_check

files__check_upgrade_ordering

Collapse
Posted by Don Baccus on
I've fixed the upper-case table names and related mostly-cosmetic/coding-standards stuff (since SQL is explicitly not case-sensitive) for acs-kernel and acs-messaging.

datamodel__acs_object_type_check now passes for PG, but still has upper-case stuff in acs-service-contract and acs-mail. acs-mail's being replaced by acs-mail-lite anyway, if someone wants to massage acs-service-contract, feel free.

Otherwise I may do it during the next stompfest.

Collapse
Posted by Emmanuelle Raffenne on
Don,

I got an error now when installing acs_messaging:

SQL*Plus: Release 9.2.0.4.0 - Production on Wed Aug 16 13:24:51 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
begin
*
ERROR at line 1:
ORA-00001: unique constraint (OPENACS.ACS_OBJECT_TYPES_TABLE_NAME_UN) violated
ORA-06512: at "OPENACS.ACS_OBJECT_TYPE", line 28
ORA-06512: at line 13
No errors.
No errors.
No errors.
SQL> Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

The SQL involved is (oracle/acs-messaging-create.sql):

acs_object_type.create_type (
supertype => 'content_revision',
object_type => 'acs_message_revision',
pretty_name => 'Message Revision',
pretty_plural => 'Message Revisions',
table_name => 'cr_revisions',
id_column => 'revision_id',
name_method => 'acs_object.default_name'
);

I will drop the unique constraint on acs_object_types.table_name on my local installation to be able to install and run the tests.

Collapse
Posted by Adrian Catalan on
I'll be working in apm_parameter_register
Collapse
Posted by Rocael Hernández Rizzardini on
btw, next one might focus as well in cleaning the bug-tracker, first test case to reproduce bug and then fix it...
Collapse
Posted by Veronica De La Cruz on
I will be working on test cases for apm_package_instance_new, apm_parameter_register, and the test case that failed for acs-subsite.
Collapse
Posted by Byron Linares on
I will be working on test cases for acs_object::
Collapse
Posted by Byron Linares on
I will be working on datamodel__named_constraints
Collapse
Posted by Adrian Catalan on
i've already done apm_parameter_register and apm_parameter_unregister and will commit right away
Collapse
Posted by Victor Argueta on
Done with "ad_proc_flush" it will be commited at the end of the day.
Collapse
Posted by Veronica De La Cruz on
Done with the acs-subsite test case that was failing, also added test case for acs-lang (lang::message::register, lang::message::get)
Collapse
Posted by Victor Argueta on
Done with "ad_proc_cache" it will be commited at the end of the day.
Collapse
Posted by César Clavería on
I have been trying for days to solve, mainly understand, the one failed test in the acs-authentication package, any help with that would be greatyly appreciated.
Collapse
Posted by Emmanuelle Raffenne on
datamodel__named_constraints committed (pg & ora). We'll work now fixing constraint names.