Broken automation tests: ExpandAsArrayTests

Login or register to post comments
8 replies [Last post]
alex94040's picture
Offline
Joined: 11/06/2008

We have a blocker for the 2.1 release: 2 unit tests (ExpandAsArrayTests) are broken.

vakopian's picture
Offline
Joined: 04/08/2008

This is because of the revision r1316 for the ticket #598.

Turns out my change was not fully backward compatible.
Rolling back the change will not help because of the failing example given in the comment on that ticket.

So I think we should merge with the current qcodo version which has cleaned up that part of the code. I'm working on this.

vakopian's picture
Offline
Joined: 04/08/2008

Well, merging with qcodo did not work. So I ended up fixing what we had. The fix is committed, and all the unit tests pass for me.

alex94040's picture
Offline
Joined: 11/06/2008

Thanks for looking into this so quickly! Tests now pass for me, too.

animekun's picture
Offline
Joined: 04/05/2008

hope this thread still connected with my problem :D. i ever encounter failed expand as array, but i cannot reproduce it, because it was long time ago. still there is a problem with expand as array, like my table structure below:

role:
id

user:
role_id => reference to role.id
username (unique)

task:
id

role_task_assn:
role_id => reference to role.id
task_id => reference to task.id

then i invoke:
<?php
$objUser
= User::LoadByUsername("admin",QQ::ExpandAsArray(QQN::User()->Role->Task));
echo
"<pre>";
print_r($objUser);
echo
"</pre>";
?>

the _objTaskArray, only has one item, but the query did return more than one, and i try using the new patch, _objTaskArray still has one item.

User Object
(
    [intId:protected] => 1
    [strUsername:protected] => admin
    [strPassword:protected] => admin
    [intRoleId:protected] => 1
    [__strVirtualAttributeArray:protected] => Array
        (
        )

    [__blnRestored:protected] => 1
    [objRole:protected] => Role Object
        (
            [intId:protected] => 1
            [strRolename:protected] => administrator
            [_objTask:RoleGen:private] =>
            [_objTaskArray:RoleGen:private] => Array
                (
                    [0] => Task Object
                        (
                            [intId:protected] => 1
                            [strTaskname:protected] => create
                            [_objRole:TaskGen:private] =>
                            [_objRoleArray:TaskGen:private] =>
                            [__strVirtualAttributeArray:protected] => Array
                                (
                                )

                            [__blnRestored:protected] => 1
                        )

                )

            [_objUser:RoleGen:private] =>
            [_objUserArray:RoleGen:private] =>
            [__strVirtualAttributeArray:protected] => Array
                (
                )

            [__blnRestored:protected] => 1
        )

)

here i attach sample of my database in zipped dump.

animekun's picture
Offline
Joined: 04/05/2008

latest qcodo also break on this,,
i think i'll skip this expand as array for the moment...

i'll report back after having some solution...

vakopian's picture
Offline
Joined: 04/08/2008

animekun, is your problem the same as this?
http://trac.qcu.be/projects/qcubed/ticket/632

animekun's picture
Offline
Joined: 04/05/2008

looks like it is indeed my problem, as of right now, i use role->getTaskArray(), to solve my problem.

so it is limitation for our framework then.

jerry0503214 (not verified)

latest qcodo also break on this,,
i think i'll skip this expand as array for the moment...

i'll report back after having some solution...

WOW Gold

Runescape Money