Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
- Loading branch information
1 parent
05ab5b0
commit ab13359
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
...story/src/test/java/com/evolveum/midpoint/testing/story/security/PerfTestRoleMembers.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright (c) 2018 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.testing.story.security; | ||
|
||
import java.util.ArrayList; | ||
import org.springframework.test.annotation.DirtiesContext; | ||
import org.springframework.test.annotation.DirtiesContext.ClassMode; | ||
import org.springframework.test.context.ContextConfiguration; | ||
import org.testng.annotations.DataProvider; | ||
import org.testng.annotations.Test; | ||
|
||
/** | ||
* Tests for privacy-enhancing setup. E.g. broad get authorizations, but limited search. | ||
* | ||
* @author semancik | ||
*/ | ||
@ContextConfiguration(locations = { "classpath:ctx-story-test-main.xml" }) | ||
@DirtiesContext(classMode = ClassMode.AFTER_CLASS) | ||
public class PerfTestRoleMembers extends TestRoleMembers { | ||
|
||
private static final int REPETITIONS = 5000; | ||
|
||
|
||
@DataProvider(name = "repetitions") | ||
public Object[][] repetitions() { | ||
ArrayList<Object[]> configs = new ArrayList<>(); | ||
for (int rep = 0; rep < REPETITIONS; rep++) { | ||
configs.add(new Object[] { rep }); | ||
} | ||
return configs.toArray(new Object[configs.size()][]); | ||
} | ||
|
||
/** | ||
* MID-4893, MID-4947 | ||
*/ | ||
@Test(dataProvider = "repetitions") | ||
public void test100AutzGuybrushNoMembers(int repetition) throws Exception { | ||
test100AutzGuybrushNoMembers(); | ||
} | ||
|
||
/** | ||
* MID-4893 | ||
*/ | ||
@Test(dataProvider = "repetitions") | ||
public void test105AutzElaineMembers(int repetition) throws Exception { | ||
test105AutzElaineMembers(); | ||
} | ||
} |