silverstripe / silverstripe-behat-extension

Silverstripe integration extension for Behat
MIT License
31 stars 30 forks source link

At Seemingly Random Intervals EmailContext will fail to find an email and throw ungraceful exception #172

Open allengeer opened 6 years ago

allengeer commented 6 years ago

I will have a functioning email test for some period of time, then randomly the check to find the email will throw a nasty exception... Any ideas?

exception 'PHPUnit_Framework_ExpectationFailedException' with message 'Failed asserting that null is not null.' in /var/www/html/vendor/phpunit/phpunit/PHPUnit/Framework/Constraint.php:144
Stack trace:
#0 /var/www/html/vendor/phpunit/phpunit/PHPUnit/Framework/Constraint/Not.php(139): PHPUnit_Framework_Constraint->fail(NULL, '')
#1 /var/www/html/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php(2137): PHPUnit_Framework_Constraint_Not->evaluate(NULL, '')
#2 /var/www/html/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php(911): PHPUnit_Framework_Assert::assertThat(NULL, Object(PHPUnit_Framework_Constraint_Not), '')
#3 [internal function]: PHPUnit_Framework_Assert::assertNotNull(NULL)
#4 /var/www/html/vendor/phpunit/phpunit/PHPUnit/Framework/Assert/Functions.php(1074): call_user_func_array('PHPUnit_Framewo...', Array)
#5 /var/www/html/vendor/silverstripe/behat-extension/src/SilverStripe/BehatExtension/Context/EmailContext.php(77): assertNotNull(NULL)
#6 [internal function]: SilverStripe\BehatExtension\Context\EmailContext->thereIsAnEmailFromTo('', 'to', '******* (redacted for confidentiality reasons)')
#7 /var/www/html/vendor/behat/behat/src/Behat/Behat/Definition/Annotation/Definition.php(155): call_user_func_array(Array, Array)
#8 /var/www/html/vendor/behat/behat/src/Behat/Behat/Tester/StepTester.php(157): Behat\Behat\Definition\Annotation\Definition->run(Object(Mysite\Test\Behaviour\FeatureContext))
#9 /var/www/html/vendor/behat/behat/src/Behat/Behat/Tester/StepTester.php(126): Behat\Behat\Tester\StepTester->executeStepDefinition(Object(Behat\Gherkin\Node\StepNode), Object(Behat\Behat\Definition\Annotation\Given))
#10 /var/www/html/vendor/behat/behat/src/Behat/Behat/Tester/StepTester.php(95): Behat\Behat\Tester\StepTester->executeStep(Object(Behat\Gherkin\Node\StepNode))
#11 /var/www/html/vendor/behat/gherkin/src/Behat/Gherkin/Node/AbstractNode.php(42): Behat\Behat\Tester\StepTester->visit(Object(Behat\Gherkin\Node\StepNode))
#12 /var/www/html/vendor/behat/behat/src/Behat/Behat/Tester/ScenarioTester.php(148): Behat\Gherkin\Node\AbstractNode->accept(Object(Behat\Behat\Tester\StepTester))
#13 /var/www/html/vendor/behat/behat/src/Behat/Behat/Tester/ScenarioTester.php(87): Behat\Behat\Tester\ScenarioTester->visitStep(Object(Behat\Gherkin\Node\StepNode), Object(Behat\Gherkin\Node\ScenarioNode), Object(Mysite\Test\Behaviour\FeatureContext), Array, false)
#14 /var/www/html/vendor/behat/gherkin/src/Behat/Gherkin/Node/AbstractNode.php(42): Behat\Behat\Tester\ScenarioTester->visit(Object(Behat\Gherkin\Node\ScenarioNode))
#15 /var/www/html/vendor/behat/behat/src/Behat/Behat/Tester/FeatureTester.php(88): Behat\Gherkin\Node\AbstractNode->accept(Object(Behat\Behat\Tester\ScenarioTester))
#16 /var/www/html/vendor/behat/gherkin/src/Behat/Gherkin/Node/AbstractNode.php(42): Behat\Behat\Tester\FeatureTester->visit(Object(Behat\Gherkin\Node\FeatureNode))
#17 /var/www/html/vendor/behat/behat/src/Behat/Behat/Console/Command/BehatCommand.php(150): Behat\Gherkin\Node\AbstractNode->accept(Object(Behat\Behat\Tester\FeatureTester))
#18 /var/www/html/vendor/behat/behat/src/Behat/Behat/Console/Command/BehatCommand.php(128): Behat\Behat\Console\Command\BehatCommand->runFeatures(Object(Behat\Gherkin\Gherkin))
#19 /var/www/html/vendor/symfony/console/Command/Command.php(242): Behat\Behat\Console\Command\BehatCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /var/www/html/vendor/symfony/console/Application.php(845): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /var/www/html/vendor/symfony/console/Application.php(196): Symfony\Component\Console\Application->doRunCommand(Object(Behat\Behat\Console\Command\BehatCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /var/www/html/vendor/behat/behat/src/Behat/Behat/Console/BehatApplication.php(68): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /var/www/html/vendor/symfony/console/Application.php(117): Behat\Behat\Console\BehatApplication->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /var/www/html/vendor/behat/behat/bin/behat(32): Symfony\Component\Console\Application->run()
#25 {main}
dhensby commented 6 years ago

is this still a problem?