Skip to content

Commit 2eb1010

Browse files
committed
ci: remove SecureRandom bean
1 parent aaefd89 commit 2eb1010

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

integration-test/src/test/java/org/cloudfoundry/IntegrationTestConfiguration.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,8 @@ ReactorLogCacheClient logCacheClient(
339339
}
340340

341341
@Bean
342-
RandomNameFactory nameFactory(Random random) {
343-
return new RandomNameFactory(random);
342+
RandomNameFactory nameFactory() {
343+
return new RandomNameFactory(new SecureRandom());
344344
}
345345

346346
@Bean(initMethod = "block")
@@ -447,11 +447,6 @@ String planName(NameFactory nameFactory) {
447447
return nameFactory.getPlanName();
448448
}
449449

450-
@Bean
451-
SecureRandom random() {
452-
return new SecureRandom();
453-
}
454-
455450
@Bean
456451
RoutingClient routingClient(ConnectionContext connectionContext, TokenProvider tokenProvider) {
457452
return ReactorRoutingClient.builder()

integration-test/src/test/java/org/cloudfoundry/logcache/v1/LogCacheTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import static org.cloudfoundry.util.DelayUtils.exponentialBackOff;
2222

2323
import java.math.BigInteger;
24+
import java.security.SecureRandom;
2425
import java.time.Duration;
2526
import java.util.Random;
2627
import java.util.function.Predicate;
@@ -40,14 +41,15 @@ public class LogCacheTest extends AbstractIntegrationTest implements Initializin
4041

4142
@Autowired LogCacheClient logCacheClient;
4243

43-
@Autowired Random random;
4444

4545
@Autowired private Mono<ApplicationUtils.ApplicationMetadata> testLogCacheApp;
4646

4747
private ApplicationUtils.ApplicationMetadata testLogCacheAppMetadata;
4848

4949
@Autowired private TestLogCacheEndpoints testLogCacheEndpoints;
5050

51+
private final Random random = new SecureRandom();
52+
5153
@Override
5254
public void afterPropertiesSet() {
5355
this.testLogCacheAppMetadata = this.testLogCacheApp.block();

0 commit comments

Comments
 (0)