Skip to content

Commit

Permalink
Adjust attachment size in the test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
akgagnat committed Sep 17, 2024
1 parent 7ff3079 commit 8996e04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class LoadTests(config: Config, private val kafkaListener: KafkaListener, val us
private val innsendingApi = InnsendingApi(config, useOAuth)

@Suppress("FunctionName")
fun `TC01 - Innsending av 10 soknader, hver med to vedlegg pa 2MB`() = runCatching {
val file = loadFile(fileOfSize2mb)
fun `TC01 - Innsending av 10 soknader, hver med to vedlegg pa 38MB`() = runCatching {
val file = loadFile(fileOfSize38mb)
val innsendingsIdListe: List<String> = opprettSoknaderAsync(10, 2, file)

val verifier = setupVerificationThatFinishedEventsAreCreated(expectedKeys = innsendingsIdListe, 10)
Expand All @@ -38,8 +38,8 @@ class LoadTests(config: Config, private val kafkaListener: KafkaListener, val us
}

@Suppress("FunctionName")
fun `TC02 - Innsending av 100 soknader, hver med tre vedlegg pa 1MB`() = runCatching {
val file = loadFile(fileOfSize1mb)
fun `TC02 - Innsending av 100 soknader, hver med tre vedlegg pa 2MB`() = runCatching {
val file = loadFile(fileOfSize2mb)
val innsendingsIdListe: List<String> = opprettSoknaderAsync(100, 3, file)

val verifier = setupVerificationThatFinishedEventsAreCreated(expectedKeys = innsendingsIdListe, 15)
Expand Down Expand Up @@ -143,4 +143,3 @@ class LoadTests(config: Config, private val kafkaListener: KafkaListener, val us
private const val fileOfSize38mb = "/Midvinterblot_(Carl_Larsson)_-_Nationalmuseum_-_32534.png"
private const val fileOfSize2mb = "/Midvinterblot_(Carl_Larsson)_-_Nationalmuseum_-_32534_small.png"
private const val fileOfSize1mb = "/Midvinterblot_(Carl_Larsson)_-_Nationalmuseum_-_32534_small.jpg"
private const val fileOfSize1byte = "/1_byte_file"
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ import kotlin.system.exitProcess
private val logger = LoggerFactory.getLogger("no.nav.soknad.arkivering.Main")

val testCases: Map<TestCase, KFunction1<LoadTests, Result<Unit>>> = mapOf(
TestCase.TC01 to LoadTests::`TC01 - Innsending av 10 soknader, hver med to vedlegg pa 2MB`,
TestCase.TC02 to LoadTests::`TC02 - Innsending av 100 soknader, hver med tre vedlegg pa 1MB`,
TestCase.TC01 to LoadTests::`TC01 - Innsending av 10 soknader, hver med to vedlegg pa 38MB`,
TestCase.TC02 to LoadTests::`TC02 - Innsending av 100 soknader, hver med tre vedlegg pa 2MB`,
TestCase.TC03 to LoadTests::`TC03 - Innsending av 1000 soknader, hver med to vedlegg pa 1MB`,
// TestCase.TC04 to LoadTests::`TC04 - Innsending av 5 soknader, hver med fire vedlegg pa 38MB`,
)

fun main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ enum class TestCase() {
TC01,
TC02,
TC03,
TC04,
}

0 comments on commit 8996e04

Please sign in to comment.