Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix run test #101

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

package org.gridsuite.sensitivityanalysis.server.configuration;

import com.fasterxml.jackson.databind.InjectableValues;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.core.json.JsonReadFeature;
import com.fasterxml.jackson.core.json.JsonWriteFeature;
import com.fasterxml.jackson.databind.*;
import com.powsybl.commons.report.ReportNodeDeserializer;
import com.powsybl.commons.report.ReportNodeJsonModule;
import com.powsybl.contingency.json.ContingencyJsonModule;
Expand Down Expand Up @@ -52,6 +52,8 @@ private MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter(

private static ObjectMapper createObjectMapper() {
var objectMapper = Jackson2ObjectMapperBuilder.json().build();
objectMapper.enable(JsonReadFeature.ALLOW_NON_NUMERIC_NUMBERS.mappedFeature());
objectMapper.disable(JsonWriteFeature.WRITE_NAN_AS_STRINGS.mappedFeature());
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
objectMapper.registerModule(new ContingencyJsonModule());
objectMapper.registerModule(new LoadFlowResultJsonModule());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.gridsuite.sensitivityanalysis.server.service.LoadFlowService;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.annotation.Autowired;
Expand Down Expand Up @@ -225,8 +224,6 @@ void tearDown() throws Exception {
mockMvc.perform(delete("/" + VERSION + "/results")).andExpect(status().isOk());
}

// TODO to fix as soon as possible
@Disabled
@Test
void runTest() throws Exception {
SensitivityAnalysisResult result = runInMemory();
Expand Down
Loading