Skip to content

Commit d2d86a0

Browse files
committed
MAGETWO-35777: Random failures of Magento\Log\Test\Unit\Model\VisitorTest
- Adding message in case test fails
1 parent 7be061d commit d2d86a0

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

app/code/Magento/Log/Test/Unit/Model/VisitorTest.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,23 @@ public function testGetUrl()
122122
public function testGetFirstVisitAt()
123123
{
124124
$time = time();
125-
$this->assertEquals($time, $this->visitor->getFirstVisitAt(), '', 5);
125+
$this->assertEquals(
126+
$time,
127+
$this->visitor->getFirstVisitAt(),
128+
'VisitorTest failed to assert the time for the first visit within 5 seconds.',
129+
5
130+
);
126131
}
127132

128133
public function testGetLastVisitAt()
129134
{
130135
$time = time();
131-
$this->assertEquals($time, $this->visitor->getLastVisitAt(), '', 5);
136+
$this->assertEquals(
137+
$time,
138+
$this->visitor->getLastVisitAt(),
139+
'VisitorTest failed to assert the time for the last visit within 5 seconds.',
140+
5
141+
);
132142
}
133143

134144
public function testLogNewVisitor()

0 commit comments

Comments
 (0)