Project

General

Profile

Actions

Bug #81277

closed

Import tests with side effects

Added by Oliver Hader over 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Tests
Target version:
-
Start date:
2017-05-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
tests
Complexity:
Is Regression:
Sprint Focus:

Description

Calling test case TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImages\ImportInFilledDatabaseTest::importPagesAndRelatedTtContentWithDifferentImageToExistingData multiple times has negative side effects. The first execution is fine, the second execution fails. I did not analyze further tests in that regard, however would expect that test cases take care of cleaning up artifacts during the tear-down phase.

First execution (all fine)

 olly@oliver  ip9.local  ./allTest.sh --filter=importPagesAndRelatedTtContentWithDifferentImageToExistingData
PHPUnit 5.7.5 by Sebastian Bergmann and contributors.

Starting test 'TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImages\ImportInFilledDatabaseTest::importPagesAndRelatedTtContentWithDifferentImageToExistingData'.
.                                                                   1 / 1 (100%)

Time: 3.43 seconds, Memory: 20.00MB

OK (1 test, 24 assertions)

Second execution (fails)

 olly@oliver  ip9.local  ./allTest.sh --filter=importPagesAndRelatedTtContentWithDifferentImageToExistingData
PHPUnit 5.7.5 by Sebastian Bergmann and contributors.

Starting test 'TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImages\ImportInFilledDatabaseTest::importPagesAndRelatedTtContentWithDifferentImageToExistingData'.
F                                                                   1 / 1 (100%)

Time: 2.32 seconds, Memory: 20.00MB

There was 1 failure:

1) TYPO3\CMS\Impexp\Tests\Functional\Import\PagesAndTtContentWithImages\ImportInFilledDatabaseTest::importPagesAndRelatedTtContentWithDifferentImageToExistingData
Record "sys_file:4" not found in database
Assertion in data-set failed for "sys_file_reference:2":
Fields   |Assertion|Record
uid_local|4        |1

Assertion in data-set failed for "sys_file_metadata:1":
Fields     |Assertion             |Record
title      |Dummy image           |NULL
description|This is a dummy image.|NULL
alternative|Photo of program code |NULL

Record "sys_file_metadata:3" not found in database

/Users/olly/Development/typo3/master/vendor/typo3/testing-framework/Classes/Core/Functional/FunctionalTestCase.php:443
/Users/olly/Development/typo3/master/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php:118
/Users/olly/Development/typo3/master/typo3/sysext/impexp/Tests/Functional/Import/PagesAndTtContentWithImages/ImportInFilledDatabaseTest.php:60

FAILURES!
Tests: 1, Assertions: 14, Failures: 1.

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #55532: Impexp: import the binary files being sys_file records to the right storageClosedMarc Bastian Heinrichs2014-01-31

Actions
Related to TYPO3 Core - Task #59731: Cleanup created files in functional test in impexpClosedMarc Bastian Heinrichs2014-06-20

Actions
Actions #1

Updated by Oliver Hader over 7 years ago

  • Description updated (diff)
Actions #2

Updated by Oliver Hader over 7 years ago

  • Related to Task #55532: Impexp: import the binary files being sys_file records to the right storage added
Actions #3

Updated by Oliver Hader over 7 years ago

  • Related to Task #59731: Cleanup created files in functional test in impexp added
Actions #4

Updated by Susanne Moog about 7 years ago

  • Status changed from New to Accepted
  • Tags set to tests
Actions #5

Updated by Oliver Hader over 4 years ago

  • Status changed from Accepted to Resolved

Could not reproduce anymore in TYPO3 v10.4-dev

Actions #6

Updated by Oliver Hader over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF