e2e-tests: Unhardcode ReplayRecordsFromFeeder data

Use scenario's own class name as its automatically generated test
project name. Do the same as what was done for CloneUsingBothProtocols.

Unhardcode the hostname and ports used by the scenario, relying on
either the defaults or optionally set JAVA_OPTS [1].

[1] https://gerrit-review.googlesource.com/Documentation/dev-e2e-tests.html#_environment_properties

Change-Id: Ie7cf3bfaf1d2879dc4023a86e964b9d4efa48d41
This commit is contained in:
Marco Miller
2020-04-07 15:00:20 -04:00
parent bcd3590c72
commit b160cbf64a
2 changed files with 8 additions and 3 deletions

View File

@@ -21,7 +21,12 @@ import io.gatling.core.structure.ScenarioBuilder
import scala.concurrent.duration._
class ReplayRecordsFromFeeder extends GitSimulation {
private val data: FileBasedFeederBuilder[Any]#F = jsonFile(resource).circular
private val data: FileBasedFeederBuilder[Any]#F#F = jsonFile(resource).convert(url).circular
private val default: String = name
override def replaceOverride(in: String): String = {
replaceKeyWith("_project", default, in)
}
private val test: ScenarioBuilder = scenario(name)
.repeat(10) {