Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

SQL error in unit tests getting ignored

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


jeroendedauw at gmail

Jun 19, 2012, 12:29 PM

Post #1 of 2 (65 views)
Permalink
SQL error in unit tests getting ignored

Hey,

I refactored some code and then ran tests to see if it all still worked. I
forgot renaming a database field somewhere, so had a query that failed.
Instead of throwing an exception with the information that would have made
the nature of the issue obvious, DatabaseBase::select returned false
causing a type error somewhere else. This method is only supposed to return
false in case SQL errors are being ignored. So why are they getting
ignored? I certainly did not specify this. And it certainly is not helpful
:)

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--
_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


hashar+wmf at free

Jun 20, 2012, 1:45 AM

Post #2 of 2 (56 views)
Permalink
Re: SQL error in unit tests getting ignored [In reply to]

Le 19/06/12 21:29, Jeroen De Dauw a écrit :
>
> I refactored some code and then ran tests to see if it all still worked. I
> forgot renaming a database field somewhere, so had a query that failed.
> Instead of throwing an exception with the information that would have made
> the nature of the issue obvious, DatabaseBase::select returned false
> causing a type error somewhere else. This method is only supposed to return
> false in case SQL errors are being ignored. So why are they getting
> ignored? I certainly did not specify this. And it certainly is not helpful
> :)

Do you have code to reproduce that please? :-)


--
Antoine "hashar" Musso


_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.