Skip to content

Commit

Permalink
PlaytikaOSS#1061 Replace SocketUtils with TestSocketUtils
Browse files Browse the repository at this point in the history
 - Fixes PlaytikaOSS#1061 (again).
 - Regression introduced with PlaytikaOSS#1074.
 - PlaytikaOSS#1044 initially fixed PlaytikaOSS#1043 by changing the minimum port passed to `SocketUtils` from 1000 to 1025. PlaytikaOSS#1062 then changed the fix and additionally resolved PlaytikaOSS#1061 by replacing `SocketUtils` with `TestSocketUtils` from spring-test. PlaytikaOSS#1074 then reverted this change reintroducing the dependency to `SocketUtils`.
  • Loading branch information
thammerl committed Dec 19, 2022
1 parent c34a111 commit cfa9a03
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.SocketUtils;
import org.springframework.test.util.TestSocketUtils;

import javax.annotation.PostConstruct;

Expand All @@ -31,7 +31,7 @@ public RedisProperties() {
@PostConstruct
public void init() {
if (this.port == 0) {
this.port = SocketUtils.findAvailableTcpPort(1025, 50000);
this.port = TestSocketUtils.findAvailableTcpPort();
}
}

Expand Down

0 comments on commit cfa9a03

Please sign in to comment.