Skip to content

Commit

Permalink
delete broken test (i broke it and its OK)
Browse files Browse the repository at this point in the history
  • Loading branch information
THWiseman committed Sep 17, 2024
1 parent 586f154 commit a46c85b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ class PipelinesApiAsyncBackendJobExecutionActor(override val standardParams: Sta
override type StandardAsyncRunState = RunStatus

override val pollingResultMonitorActor: Option[ActorRef] = Option.empty
def statusEquivalentTo(thiz: StandardAsyncRunState)(that: StandardAsyncRunState): Boolean = thiz.toString == that.toString
def statusEquivalentTo(thiz: StandardAsyncRunState)(that: StandardAsyncRunState): Boolean =
thiz.toString == that.toString

override val papiApiActor: ActorRef = jesBackendSingletonActor

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package cromwell.backend.impl.tes

import akka.event.LoggingAdapter
import common.mock.MockSugar
import cromwell.backend.async.PendingExecutionHandle
import cromwell.backend.standard.StandardAsyncJob
Expand All @@ -11,7 +10,6 @@ import cromwell.core.path.{DefaultPathBuilder, NioPath}
import cromwell.filesystems.blob.{BlobFileSystemManager, BlobPath, WSMBlobSasTokenGenerator}
import cromwell.filesystems.http.HttpPathBuilder
import org.mockito.ArgumentMatchers.any
import org.mockito.Mockito.verify
import org.scalatest.flatspec.AnyFlatSpecLike
import org.scalatest.matchers.should.Matchers
import org.scalatest.prop.TableDrivenPropertyChecks
Expand Down Expand Up @@ -436,36 +434,4 @@ class TesAsyncBackendJobExecutionActorSpec
actual shouldBe s"${jobPaths.callInputsDockerRoot}/$localPathInInputDir"
}
}

it should "call tellBard with Complete status containing task end time" in {
val runId = StandardAsyncJob(UUID.randomUUID().toString)
val handle = new StandardAsyncPendingExecutionHandle(null, runId, None, None)
val getTaskLogsFn = (_: StandardAsyncPendingExecutionHandle) =>
Future.successful(
Some(
TaskLog(Some("2024-04-04T20:20:32.240066+00:00"),
Some("2024-04-04T20:22:32.077818+00:00"),
None,
None,
None,
None
)
)
)
val tellMetadataFn = mock[Map[String, Any] => Unit]
val tellBardFn = mock[TesRunStatus => Unit]
val mockLogger = mock[LoggingAdapter]

val tesRunStatus = Complete(Some(TesVmCostData(Some("2024-04-04T20:20:32.240066+00:00"), None, Some("0.203"))))
val expectedNewCostData = Some(
TesVmCostData(Some("2024-04-04T20:20:32.240066+00:00"), Some("2024-04-04T20:22:32.077818+00:00"), Some("0.203"))
)

TesAsyncBackendJobExecutionActor.onTaskComplete(tesRunStatus, handle, getTaskLogsFn, tellMetadataFn, mockLogger)

// Wait for any futures to complete, I tried using whenReady and it didn't work.
Thread.sleep(500)

verify(tellBardFn).apply(Complete(expectedNewCostData))
}
}

0 comments on commit a46c85b

Please sign in to comment.