Fix flaky transcription duration assertion in CI.
Use integer timestamps for duration and pin the test clock to a whole second so SQLite round-trips stay stable.
This commit is contained in:
@@ -434,7 +434,7 @@ class Recording extends Model
|
||||
$startedAt = $this->transcription_started_at;
|
||||
$durationSeconds = $startedAt === null
|
||||
? null
|
||||
: max(0, (int) round($startedAt->diffInSeconds($finishedAt)));
|
||||
: max(0, $finishedAt->getTimestamp() - $startedAt->getTimestamp());
|
||||
|
||||
$this->forceFill([
|
||||
'transcript' => $text,
|
||||
|
||||
Reference in New Issue
Block a user