Moodle

Blog unit tests failing

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 2.0
  • Fix Version/s: None
  • Component/s: Blog
  • Labels:
    None
  • Affected Branches:
    MOODLE_20_STABLE

Description

This may be postgres only:

Exception: blog/simpletest/testbloglib.php / ? bloglib_test / ? test_overrides
Unexpected exception of type [dml_read_exception] with message [Error reading from database] in [/fs2/www/html/tjh238/moodle_head/lib/dml/moodle_database.php line 362]

Error string: dmlreadexception from error - Error reading from database

ERROR: invalid input syntax for integer: ""

SELECT * FROM mh_context WHERE contextlevel = $1 AND instanceid = $2
[array (
0 => 50,
1 => false,
)]

Since MySQL probably treats an empty string as the integer 0. Anyway, needs to be fixed.

Activity

Hide
Alan Hardy added a comment -

I have just encountered this same issue during a upgrade from moodle 1.97 to 2.0 preview 1

Show
Alan Hardy added a comment - I have just encountered this same issue during a upgrade from moodle 1.97 to 2.0 preview 1
Hide
Tomasz Muras added a comment -

Is it still a problem? I have run them just fine on 2.0.1 (Build: 20101225):
1/1 test cases complete: 23 passes, 0 fails and 0 exceptions.

Show
Tomasz Muras added a comment - Is it still a problem? I have run them just fine on 2.0.1 (Build: 20101225): 1/1 test cases complete: 23 passes, 0 fails and 0 exceptions.
Hide
Tomasz Muras added a comment -

I have tested using MySQL and PostgreSQL on Linux - blog unit tests work just fine on both.

Show
Tomasz Muras added a comment - I have tested using MySQL and PostgreSQL on Linux - blog unit tests work just fine on both.
Hide
Tim Hunt added a comment -

I guess this got fixed when the OU team fixed all the unit test (see http://learn.open.ac.uk/mod/oublog/viewpost.php?post=48794) but we did not spot this old bug report at the time.

Thank you for pointing out that this bug report can now be closed.

Show
Tim Hunt added a comment - I guess this got fixed when the OU team fixed all the unit test (see http://learn.open.ac.uk/mod/oublog/viewpost.php?post=48794) but we did not spot this old bug report at the time. Thank you for pointing out that this bug report can now be closed.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: