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;
|
public static final int maxDuration = 450;
|
||||||
|
|
||||||
private static final Random random;
|
private static final Random random;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
random = new Random();
|
random = new Random();
|
||||||
minutesInAnYear = (int) TimeUnit.DAYS.toMinutes(365);
|
minutesInAnYear = (int) TimeUnit.DAYS.toMinutes(365);
|
||||||
|
@ -79,13 +80,9 @@ public class PersistencePostgreSQLTest extends ContextTest {
|
||||||
serviceUsageRecord.setHost("host" + (25-randomNumber) + ".d4science.org");
|
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 {
|
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 {
|
public static void setServiceClassAndName(AggregatedServiceUsageRecord serviceUsageRecord) throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue