minor change
This commit is contained in:
parent
7cbfc33ecf
commit
f77e7ffa22
|
@ -63,6 +63,7 @@ public class PersistencePostgreSQLTest extends ContextTest {
|
|||
public static final int maxDuration = 450;
|
||||
|
||||
private static final Random random;
|
||||
|
||||
static {
|
||||
random = new Random();
|
||||
minutesInAnYear = (int) TimeUnit.DAYS.toMinutes(365);
|
||||
|
@ -79,13 +80,9 @@ public class PersistencePostgreSQLTest extends ContextTest {
|
|||
serviceUsageRecord.setHost("host" + (25-randomNumber) + ".d4science.org");
|
||||
}
|
||||
|
||||
public static String getRandomUser() {
|
||||
int randomNumber = random.nextInt(users.length);
|
||||
return users[randomNumber];
|
||||
}
|
||||
|
||||
public static void setConsumerId(AggregatedServiceUsageRecord serviceUsageRecord) throws Exception {
|
||||
serviceUsageRecord.setConsumerId(getRandomUser());
|
||||
int randomNumber = random.nextInt(users.length);
|
||||
serviceUsageRecord.setConsumerId(users[randomNumber]);
|
||||
}
|
||||
|
||||
public static void setServiceClassAndName(AggregatedServiceUsageRecord serviceUsageRecord) throws Exception {
|
||||
|
|
Loading…
Reference in New Issue