• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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!
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#2
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
Reply

#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.
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#4
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
Reply

#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.
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#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
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#7
(10-18-2017, 03: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
Reply

#8
(10-18-2017, 11: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
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply

#9
(10-19-2017, 07:08 AM)kilishan Wrote:
(10-18-2017, 11: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
Reply

#10
Sounds great. Looking forward to it!
Practical CodeIgniter 3  • CodeIgniter 4 Foundations - Coming Soon • Vulcan - CLI Tools for CI4
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.