Welcome Guest, Not a member yet? Register   Sign In
HELP NEEDED: recreating the cause of Travis' current test failures
#1

Hey everyone - TravisCI is currently failing in all cases on one specific test: testing creating db tables. The only problem is that I cannot recreate that locally.

I've got both a MAMP/MySQL and a Homestead/MariaDB installs and that test passes in both environments.

Can anyone try their systems and see if the tests pass for you? I can't resolve this without recreating it, unfortunately.

Thanks!
#2

(This post was last modified: 10-17-2017, 07:34 AM by sv3tli0.)

Note that I am under win-10 and I got some other errors..

At \tests\system\Database\Live\ForgeTest.php:27 I already have table 'forge_test_table' .
Commenting this "$this->forge->createTable('forge_test_table', true);" fixes my issue.

P.S > changing the name of that table or dropping if exists before create is fine as well.
Best VPS Hosting : Digital Ocean
#3

Thanks for checking. I tried just pushing a change that dropped the table prior to running that test, and it didn't work on Travis. But my lunch is about over so will have to experiment a little more tonight.
#4

(This post was last modified: 10-18-2017, 03:43 AM by sv3tli0.)

So with little more tests...

I am not sure for the reason, but the issue occurs when you have empty test DB.
If you run all tests with empty DB you get that fail + the DB will posses that forge_test_table after all tests end.

The second time you run those tests (without deleting that table) it will be successful..
Best VPS Hosting : Digital Ocean
#5

That's interesting. And definitely gives something to look into.

I spent a decent chunk of free-time last night getting a Windows 10 install up and running under Parallels so I could test some of this.
#6

@sv3tli0 - that pointed me in the right direction, thanks! Fixed that error, though I now have another to rewrite with due to to PHP 7's not guaranteeing array ordering. Not that I'm complaining - I'm very thankful I didn't have to write the foreign key code for Forge, so I'll gladly refactor the contributor's test Smile
#7

(10-18-2017, 02:36 PM)kilishan Wrote: @sv3tli0 - that pointed me in the right direction, thanks! Fixed that error, though I now have another to rewrite with due to to PHP 7's not guaranteeing array ordering. Not that I'm complaining - I'm very thankful I didn't have to write the foreign key code for Forge, so I'll gladly refactor the contributor's test Smile

Specially for arrays I think that one array helper will always be useful, at core and at app development there are often shits happening when someone wants to order or merge multidimensional arrays..
Maybe we can think for such helper, with defined several useful array functions. As ordering (by key / value), merging (deep merging),  check for keys or values existing and other functions.
Best VPS Hosting : Digital Ocean
#8

(10-18-2017, 10:15 PM)sv3tli0 Wrote: Specially for arrays I think that one array helper will always be useful, at core and at app development there are often shits happening when someone wants to order or merge multidimensional arrays..
Maybe we can think for such helper, with defined several useful array functions. As ordering (by key / value), merging (deep merging),  check for keys or values existing and other functions.

I would be very much in favor of those types of array helpers if you want to submit a PR. Anything simple that PHP already covers is not needed, but the more involved things like the ones you mentioned I have no problems with. Some of them I use so infrequently that I have to re-teach myself how to do every time. Smile
#9

(10-19-2017, 06:08 AM)kilishan Wrote:
(10-18-2017, 10:15 PM)sv3tli0 Wrote: Specially for arrays I think that one array helper will always be useful, at core and at app development there are often shits happening when someone wants to order or merge multidimensional arrays..
Maybe we can think for such helper, with defined several useful array functions. As ordering (by key / value), merging (deep merging),  check for keys or values existing and other functions.

I would be very much in favor of those types of array helpers if you want to submit a PR. Anything simple that PHP already covers is not needed, but the more involved things like the ones you mentioned I have no problems with. Some of them I use so infrequently that I have to re-teach myself how to do every time. Smile

Ok I will try to find some time about such PR next week.
Best VPS Hosting : Digital Ocean
#10

Sounds great. Looking forward to it!




Theme © iAndrew 2016 - Forum software by © MyBB