1
0

[MINOR] Reuse random object (#1222)

This commit is contained in:
lamber-ken
2020-01-14 10:26:04 +08:00
committed by vinoth chandar
parent c1f8acab34
commit fd8f1c70c0
2 changed files with 4 additions and 2 deletions

View File

@@ -93,6 +93,7 @@ import static org.junit.Assert.fail;
*/
public class TestHoodieDeltaStreamer extends UtilitiesTestBase {
private static final Random RANDOM = new Random();
private static final String PROPS_FILENAME_TEST_SOURCE = "test-source.properties";
private static final String PROPS_FILENAME_TEST_INVALID = "test-invalid.properties";
private static final Logger LOG = LogManager.getLogger(TestHoodieDeltaStreamer.class);
@@ -634,7 +635,7 @@ public class TestHoodieDeltaStreamer extends UtilitiesTestBase {
*/
@Override
public Double call(Double lat1, Double lat2, Double lon1, Double lon2) {
return new Random().nextDouble();
return RANDOM.nextDouble();
}
}