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

Failing test: MediaSourceUpdateTest #2060

Closed
alxp opened this issue Mar 9, 2022 · 2 comments
Closed

Failing test: MediaSourceUpdateTest #2060

alxp opened this issue Mar 9, 2022 · 2 comments

Comments

@alxp
Copy link
Contributor

alxp commented Mar 9, 2022

On a fresh Islandora install the following MediaSourceUpdateTest is failing:

vagrant@islandora8:/var/www/html/drupal/web$ ../vendor/bin/phpunit -c core/phpunit.xml modules/contrib/islandora/tests/src/Functional/MediaSourceUpdateTest.php 
PHPUnit 9.5.18 #StandWithUkraine

Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

Testing Drupal\Tests\islandora\Functional\MediaSourceUpdateTest
F                                                                   1 / 1 (100%)

Time: 00:36.114, Memory: 10.00 MB

There was 1 failure:

1) Drupal\Tests\islandora\Functional\MediaSourceUpdateTest::testMediaSourceUpdate
Expected 204, received 500
Failed asserting that false is true.

HTML output:

ID #5 ([Previous](http://localhost:8000/sites/simpletest/browser_output/Drupal_Tests_islandora_Functional_MediaSourceUpdateTest-4-34842439.html) | [Next](http://localhost:8000/sites/simpletest/browser_output/Drupal_Tests_islandora_Functional_MediaSourceUpdateTest-6-34842439.html)) Called from GuzzleHttp\Promise\FulfilledPromise::GuzzleHttp\Promise\{closure}() line 41 PUT request to: http://localhost:8000/media/1/source [Skip to main content](http://localhost:8000/sites/simpletest/browser_output/Drupal_Tests_islandora_Functional_MediaSourceUpdateTest-5-34842439.html#main-content) A client error happened Headers: array ( 'Date' => 'Wed, 09 Mar 2022 18:23:27 GMT', 'Server' => 'Apache/2.4.41 (Ubuntu)', 'X-Powered-By' => 'PHP/7.4.28', 'X-Drupal-Assertion-0' => 'a%3A3%3A%7Bi%3A0%3BO%3A25%3A%22Drupal%5CCore%5CRender%5CMarkup%22%3A1%3A%7Bs%3A9%3A%22%00%2A%00string%22%3Bs%3A155%3A%22The%20%22Symfony%5CComponent%5CHttpFoundation%5CFile%5CMimeType%5CMimeTypeGuesser%22%20class%20is%20deprecated%20since%20Symfony%204.3%2C%20use%20%22Symfony%5CComponent%5CMime%5CMimeTypes%22%20instead.%22%3B%7Di%3A1%3Bs%3A24%3A%22User%20deprecated%20function%22%3Bi%3A2%3Ba%3A3%3A%7Bs%3A8%3A%22function%22%3Bs%3A9%3A%22include%28%29%22%3Bs%3A4%3A%22file%22%3Bs%3A85%3A%22%2Fvar%2Fwww%2Fhtml%2Fdrupal%2Fvendor%2Fsymfony%2Fhttp-foundation%2FFile%2FMimeType%2FMimeTypeGuesser.php%22%3Bs%3A4%3A%22line%22%3Bi%3A18%3B%7D%7D', 'X-Drupal-Assertion-1' => 'a%3A3%3A%7Bi%3A0%3BO%3A25%3A%22Drupal%5CCore%5CRender%5CMarkup%22%3A1%3A%7Bs%3A9%3A%22%00%2A%00string%22%3Bs%3A181%3A%22The%20%22Symfony%5CComponent%5CHttpFoundation%5CFile%5CMimeType%5CFileBinaryMimeTypeGuesser%22%20class%20is%20deprecated%20since%20Symfony%204.3%2C%20use%20%22Symfony%5CComponent%5CMime%5CFileBinaryMimeTypeGuesser%22%20instead.%22%3B%7Di%3A1%3Bs%3A24%3A%22User%20deprecated%20function%22%3Bi%3A2%3Ba%3A3%3A%7Bs%3A8%3A%22function%22%3Bs%3A9%3A%22include%28%29%22%3Bs%3A4%3A%22file%22%3Bs%3A95%3A%22%2Fvar%2Fwww%2Fhtml%2Fdrupal%2Fvendor%2Fsymfony%2Fhttp-foundation%2FFile%2FMimeType%2FFileBinaryMimeTypeGuesser.php%22%3Bs%3A4%3A%22line%22%3Bi%3A18%3B%7D%7D', 'X-Drupal-Assertion-2' => 'a%3A3%3A%7Bi%3A0%3BO%3A25%3A%22Drupal%5CCore%5CRender%5CMarkup%22%3A1%3A%7Bs%3A9%3A%22%00%2A%00string%22%3Bs%3A177%3A%22The%20%22Symfony%5CComponent%5CHttpFoundation%5CFile%5CMimeType%5CFileinfoMimeTypeGuesser%22%20class%20is%20deprecated%20since%20Symfony%204.3%2C%20use%20%22Symfony%5CComponent%5CMime%5CFileinfoMimeTypeGuesser%22%20instead.%22%3B%7Di%3A1%3Bs%3A24%3A%22User%20deprecated%20function%22%3Bi%3A2%3Ba%3A3%3A%7Bs%3A8%3A%22function%22%3Bs%3A9%3A%22include%28%29%22%3Bs%3A4%3A%22file%22%3Bs%3A93%3A%22%2Fvar%2Fwww%2Fhtml%2Fdrupal%2Fvendor%2Fsymfony%2Fhttp-foundation%2FFile%2FMimeType%2FFileinfoMimeTypeGuesser.php%22%3Bs%3A4%3A%22line%22%3Bi%3A18%3B%7D%7D', 'Cache-Control' => 'must-revalidate, no-cache, private', 'X-Drupal-Dynamic-Cache' => 'UNCACHEABLE', 'X-UA-Compatible' => 'IE=edge', 'Content-language' => 'en', 'X-Content-Type-Options' => 'nosniff', 'X-Frame-Options' => 'SAMEORIGIN', 'Permissions-Policy' => 'interest-cohort=()', 'X-Drupal-Cache-Tags' => '4xx-response config:block_list http_response rendered', 'X-Drupal-Cache-Contexts' => 'languages:language_interface theme url.query_args:_wrapper_format user.permissions', 'X-Drupal-Cache-Max-Age' => '0 (Uncacheable)', 'Expires' => 'Sun, 19 Nov 1978 05:00:00 GMT', 'X-Generator' => 'Drupal 9 (https://www.drupal.org)', 'Content-Length' => '5253', 'Connection' => 'close', 'Content-Type' => 'text/html; charset=UTF-8', )

Last HTML output:

ID #12 ([Previous](http://localhost:8000/sites/simpletest/browser_output/Drupal_Tests_islandora_Functional_MediaSourceUpdateTest-11-34745505.html) | [Next](http://localhost:8000/sites/simpletest/browser_output/Drupal_Tests_islandora_Functional_MediaSourceUpdateTest-13-34745505.html)) Called from GuzzleHttp\Promise\FulfilledPromise::GuzzleHttp\Promise\{closure}() line 41 PUT request to: http://localhost:8000/media/1/source The website encountered an unexpected error. Please try again later.

Symfony\Component\HttpKernel\Exception\HttpException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE "fid" = '1'' at line 2: UPDATE "test34745505filehash" SET WHERE "fid" = :db_condition_placeholder_0; Array ( [:db_condition_placeholder_0] => 1 ) in Drupal\islandora\Controller\MediaSourceController->put() (line 127 of modules/contrib/islandora/src/Controller/MediaSourceController.php).
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Headers:
array (
'Date' => 'Wed, 09 Mar 2022 19:27:21 GMT',
'Server' => 'Apache/2.4.41 (Ubuntu)',
'X-Powered-By' => 'PHP/7.4.28',
'X-Drupal-Assertion-0' => 'a%3A3%3A%7Bi%3A0%3BO%3A25%3A%22Drupal%5CCore%5CRender%5CMarkup%22%3A1%3A%7Bs%3A9%3A%22%00%2A%00string%22%3Bs%3A155%3A%22The%20%22Symfony%5CComponent%5CHttpFoundation%5CFile%5CMimeType%5CMimeTypeGuesser%22%20class%20is%20deprecated%20since%20Symfony%204.3%2C%20use%20%22Symfony%5CComponent%5CMime%5CMimeTypes%22%20instead.%22%3B%7Di%3A1%3Bs%3A24%3A%22User%20deprecated%20function%22%3Bi%3A2%3Ba%3A3%3A%7Bs%3A8%3A%22function%22%3Bs%3A9%3A%22include%28%29%22%3Bs%3A4%3A%22file%22%3Bs%3A85%3A%22%2Fvar%2Fwww%2Fhtml%2Fdrupal%2Fvendor%2Fsymfony%2Fhttp-foundation%2FFile%2FMimeType%2FMimeTypeGuesser.php%22%3Bs%3A4%3A%22line%22%3Bi%3A18%3B%7D%7D',
'X-Drupal-Assertion-1' => 'a%3A3%3A%7Bi%3A0%3BO%3A25%3A%22Drupal%5CCore%5CRender%5CMarkup%22%3A1%3A%7Bs%3A9%3A%22%00%2A%00string%22%3Bs%3A181%3A%22The%20%22Symfony%5CComponent%5CHttpFoundation%5CFile%5CMimeType%5CFileBinaryMimeTypeGuesser%22%20class%20is%20deprecated%20since%20Symfony%204.3%2C%20use%20%22Symfony%5CComponent%5CMime%5CFileBinaryMimeTypeGuesser%22%20instead.%22%3B%7Di%3A1%3Bs%3A24%3A%22User%20deprecated%20function%22%3Bi%3A2%3Ba%3A3%3A%7Bs%3A8%3A%22function%22%3Bs%3A9%3A%22include%28%29%22%3Bs%3A4%3A%22file%22%3Bs%3A95%3A%22%2Fvar%2Fwww%2Fhtml%2Fdrupal%2Fvendor%2Fsymfony%2Fhttp-foundation%2FFile%2FMimeType%2FFileBinaryMimeTypeGuesser.php%22%3Bs%3A4%3A%22line%22%3Bi%3A18%3B%7D%7D',
'X-Drupal-Assertion-2' => 'a%3A3%3A%7Bi%3A0%3BO%3A25%3A%22Drupal%5CCore%5CRender%5CMarkup%22%3A1%3A%7Bs%3A9%3A%22%00%2A%00string%22%3Bs%3A177%3A%22The%20%22Symfony%5CComponent%5CHttpFoundation%5CFile%5CMimeType%5CFileinfoMimeTypeGuesser%22%20class%20is%20deprecated%20since%20Symfony%204.3%2C%20use%20%22Symfony%5CComponent%5CMime%5CFileinfoMimeTypeGuesser%22%20instead.%22%3B%7Di%3A1%3Bs%3A24%3A%22User%20deprecated%20function%22%3Bi%3A2%3Ba%3A3%3A%7Bs%3A8%3A%22function%22%3Bs%3A9%3A%22include%28%29%22%3Bs%3A4%3A%22file%22%3Bs%3A93%3A%22%2Fvar%2Fwww%2Fhtml%2Fdrupal%2Fvendor%2Fsymfony%2Fhttp-foundation%2FFile%2FMimeType%2FFileinfoMimeTypeGuesser.php%22%3Bs%3A4%3A%22line%22%3Bi%3A18%3B%7D%7D',
'Cache-Control' => 'must-revalidate, no-cache, private',
'X-UA-Compatible' => 'IE=edge',
'Content-language' => 'en',
'X-Content-Type-Options' => 'nosniff',
'X-Frame-Options' => 'SAMEORIGIN',
'Permissions-Policy' => 'interest-cohort=()',
'Expires' => 'Sun, 19 Nov 1978 05:00:00 GMT',
'X-Generator' => 'Drupal 9 (https://www.drupal.org)',
'Content-Length' => '2094',
'Connection' => 'close',
'Content-Type' => 'text/html; charset=UTF-8',
)

@alxp
Copy link
Contributor Author

alxp commented Mar 23, 2022

Issue is with FIleHash, fixed in the 2.x branch. Fix is in this PR Islandora/islandora#862

1 similar comment
@alxp
Copy link
Contributor Author

alxp commented Mar 23, 2022

Issue is with FIleHash, fixed in the 2.x branch. Fix is in this PR Islandora/islandora#862

@alxp alxp closed this as completed Mar 23, 2022
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

No branches or pull requests

1 participant