3 ms·
I don't know what you do, but for our codebase, we run transactions against the database in most of the integration tests. We can't generally be sure the datab
by dnautics 5y ago
I don't know what you do, but for our codebase, we run transactions against the database in most of the integration tests. We can't generally be sure the database won't return rows in some order it likes that aren't the rows we expect -- so if we don't have a generic sorting function we will have flaky tests.
- jstimpfle 5y agoIf you can't bring the database to return the values in a well defined order, absolutely go ahead and sort it! No need for _generics_ though, qsort() will do just fine. (C probably isn't great for DB interop in any case).