Skip to content

Commit

Permalink
Update with default value to avoid build fail and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
utas-raymondng committed Nov 19, 2024
1 parent f28e55f commit c5d3ed7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public enum PointOrientation {
// if we do not preserve this, we will result polygon rejected by elastic due to not having 3 non-collinear
// points after rounding by the GeometryJson
protected static GeometryJSON geometryJson = new GeometryJSON(15);

// A value based on trial and error, this is a default value and user can override it with the yaml file
@Getter
@Setter
protected static double coastalPrecision = 0.1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import lombok.extern.slf4j.Slf4j;
import org.json.JSONException;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
Expand Down Expand Up @@ -78,6 +79,11 @@ public class StacCollectionMapperServiceTest {

protected IndexerServiceImpl indexerService;

@BeforeAll
public static void preSetup() {
GeometryUtils.setCoastalPrecision(0.05);
}

protected void verify(String expected) throws JsonProcessingException, JSONException {
Map<?,?> content = objectMapper.readValue(lastRequest.get().document().toString(), Map.class);
String out = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(content);
Expand Down

0 comments on commit c5d3ed7

Please sign in to comment.