You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the database changes that are due to arrive on next, running the unit tests against other RDBMs is now possible.
My testing was done with MySQL, and there are two unit tests that fail:
test_filtering_on_machine_label_fields
test_filtering_on_test_label_fields
The generated SQL by Django's ORM + custom model logic in the frontend code is bad code, and MySQL can not run it.
This is an example of the SQL generated on test_filtering_on_machine_label_fields already with query parameters applied:
SELECT
(DATE(test_finished_time)) AS `DATE(test_finished_time)`,
(DATE(job_queued_time)) AS `DATE(job_queued_time)`,
(IF(`machine_label_label1`.id IS NOT NULL, 'label1', NULL)) AS `machine_label_label1`,
`tko_test_view_2`.`test_idx`,
`tko_test_view_2`.`job_idx`,
`tko_test_view_2`.`test_name`,
`tko_test_view_2`.`subdir`,
`tko_test_view_2`.`kernel_idx`,
`tko_test_view_2`.`status_idx`,
`tko_test_view_2`.`reason`,
`tko_test_view_2`.`machine_idx`,
`tko_test_view_2`.`test_started_time`,
`tko_test_view_2`.`test_finished_time`,
`tko_test_view_2`.`job_tag`,
`tko_test_view_2`.`job_name`,
`tko_test_view_2`.`job_owner`,
`tko_test_view_2`.`job_queued_time`,
`tko_test_view_2`.`job_started_time`,
`tko_test_view_2`.`job_finished_time`,
`tko_test_view_2`.`afe_job_id`,
`tko_test_view_2`.`hostname`,
`tko_test_view_2`.`platform`,
`tko_test_view_2`.`machine_owner`,
`tko_test_view_2`.`kernel_hash`,
`tko_test_view_2`.`kernel_base`,
`tko_test_view_2`.`kernel`,
`tko_test_view_2`.`status`
FROM
`tko_test_view_2` LEFT OUTER JOIN `tko_test_attributes` AS `machine_label_label1`
ON
(`machine_label_label1`.`test_idx` = `tko_test_view_2`.`test_idx`
AND ((`machine_label_label1`.`attribute` = 'host-labels' AND FIND_IN_SET('label1', `machine_label_label1`.value)))
)
WHERE machine_label_label1 = "label1";
And the error:
ERROR 1054 (42S22): Unknown column 'machine_label_label1' in 'where clause'
It looks like this will involve changes to the model custom logic, which is already in need of simplification.
Since running the unit tests against other database backends has never been supported, and running it now requires changes to the code this is not a regression, but a new condition.
Anyway, let's keep track of it and try to solve it ASAP to officially allow and support running the unit tests against all database backends.
The text was updated successfully, but these errors were encountered:
With the database changes that are due to arrive on next, running the unit tests against other RDBMs is now possible.
My testing was done with MySQL, and there are two unit tests that fail:
The generated SQL by Django's ORM + custom model logic in the frontend code is bad code, and MySQL can not run it.
This is an example of the SQL generated on
test_filtering_on_machine_label_fields
already with query parameters applied:And the error:
It looks like this will involve changes to the model custom logic, which is already in need of simplification.
Since running the unit tests against other database backends has never been supported, and running it now requires changes to the code this is not a regression, but a new condition.
Anyway, let's keep track of it and try to solve it ASAP to officially allow and support running the unit tests against all database backends.
The text was updated successfully, but these errors were encountered: