Skip to content

Commit

Permalink
Merge pull request #5 from rooeque/gatlingDI
Browse files Browse the repository at this point in the history
change gatling adapters to use DI instead of directly calling measurement controllers
  • Loading branch information
rooeque authored Sep 13, 2018
2 parents 1a671b9 + 8a6f5ab commit 321d59c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.workday.warp.adapters.gatling

import com.workday.warp.adapters.gatling.traits.{HasDefaultTestName, HasWarpHooks}
import com.workday.warp.collectors.{AbstractMeasurementCollectionController, DefaultMeasurementCollectionController}
import com.workday.warp.collectors.AbstractMeasurementCollectionController
import com.workday.warp.common.CoreConstants.{UNDEFINED_TEST_ID => DEFAULT_TEST_ID}
import com.workday.warp.inject.WarpGuicer
import io.gatling.http.funspec.GatlingHttpFunSpec

/**
Expand All @@ -14,7 +15,7 @@ abstract class WarpFunSpec(val testId: String) extends GatlingHttpFunSpec with H

def this() = this(DEFAULT_TEST_ID)

val controller: AbstractMeasurementCollectionController = new DefaultMeasurementCollectionController(this.canonicalName)
val controller: AbstractMeasurementCollectionController = WarpGuicer.getController(this.canonicalName, tags = List.empty)

before {
beforeStart()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.workday.warp.adapters.gatling

import com.workday.warp.adapters.gatling.traits.{HasDefaultTestName, HasWarpHooks}
import com.workday.warp.collectors.{AbstractMeasurementCollectionController, DefaultMeasurementCollectionController}
import com.workday.warp.collectors.AbstractMeasurementCollectionController
import com.workday.warp.common.CoreConstants.{UNDEFINED_TEST_ID => DEFAULT_TEST_ID}
import com.workday.warp.inject.WarpGuicer
import io.gatling.core.Predef.Simulation

/**
Expand All @@ -14,7 +15,7 @@ abstract class WarpSimulation(val testId: String) extends Simulation with HasDef

def this() = this(DEFAULT_TEST_ID)

val controller: AbstractMeasurementCollectionController = new DefaultMeasurementCollectionController(this.canonicalName)
val controller: AbstractMeasurementCollectionController = WarpGuicer.getController(this.testId, tags = List.empty)

before {
beforeStart()
Expand Down

0 comments on commit 321d59c

Please sign in to comment.