Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tool_excimer\tool_excimer_purge_page_group_test::test_purge - Excimer failing in unittest #353

Closed
MichaelReyesCatcan opened this issue Aug 29, 2024 · 1 comment · Fixed by #355

Comments

@MichaelReyesCatcan
Copy link

Reporting this issue causing unit test failure. Due to having two entries with the same month and year. This error occurred because we are on the 29th day of August. When it went 7 months before it is retrieving March instead of February. Maybe the 29th of February is causing an issue.

There was 1 error:

1) tool_excimer\tool_excimer_purge_page_group_test::test_purge
dml_write_exception: Error writing to database (ERROR:  duplicate key value violates unique constraint "phpu_toolexcipagegrou_namm_uix"
DETAIL:  Key (name, month)=(, 202403) already exists.
INSERT INTO phpu_tool_excimer_page_groups (month,fuzzydurationcounts) VALUES($1,$2) RETURNING id
[array (
  'month' => 202403,
  'fuzzydurationcounts' => '',
)])

/var/www/site/lib/dml/moodle_database.php:497
/var/www/site/lib/dml/moodle_read_slave_trait.php:293
/var/www/site/lib/dml/pgsql_native_moodle_database.php:341
/var/www/site/lib/dml/pgsql_native_moodle_database.php:1132
/var/www/site/lib/dml/pgsql_native_moodle_database.php:1180
/var/www/site/admin/tool/excimer/tests/tool_excimer_purge_page_group_test.php:59
/var/www/site/lib/phpunit/classes/advanced_testcase.php:80
@glepod
Copy link

glepod commented Aug 30, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants