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(document-handling): fixes after Simon comment #3811

Merged
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 @@ -55,12 +55,8 @@ public class InboundConnectorContextBuilder {
protected DocumentFactory documentFactory =
new DocumentFactoryImpl(InMemoryDocumentStore.INSTANCE);
protected ObjectMapper objectMapper =
ConnectorsObjectMapperSupplier.getCopy()
.registerModule(
new JacksonModuleDocument(
this.documentFactory,
null,
JacksonModuleDocument.DocumentModuleSettings.create()));
ConnectorsObjectMapperSupplier.getCopy(
this.documentFactory, JacksonModuleDocument.DocumentModuleSettings.create());

public static InboundConnectorContextBuilder create() {
return new InboundConnectorContextBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,8 @@ public class OutboundConnectorContextBuilder {
protected DocumentFactory documentFactory =
new DocumentFactoryImpl(InMemoryDocumentStore.INSTANCE);
private ObjectMapper objectMapper =
ConnectorsObjectMapperSupplier.getCopy()
.registerModule(
new JacksonModuleDocument(
this.documentFactory,
null,
JacksonModuleDocument.DocumentModuleSettings.create()));
ConnectorsObjectMapperSupplier.getCopy(
this.documentFactory, JacksonModuleDocument.DocumentModuleSettings.create());

/**
* @return a new instance of the {@link OutboundConnectorContextBuilder}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import static io.camunda.connector.e2e.BpmnFile.replace;
import static org.mockito.Mockito.when;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
Expand Down Expand Up @@ -64,6 +65,7 @@ public class RabbitMqInboundStartEventTests extends BaseRabbitMqTest {
private static String PORT;
private static RabbitMQContainer rabbitMQContainer;
private static ConnectionFactory factory;
private final ObjectMapper objectMapper = ConnectorsObjectMapperSupplier.getCopy();

@Autowired ProcessStateStore processStateStore;

Expand Down Expand Up @@ -131,10 +133,9 @@ public void uriAuthenticationReceiveMessageTest() throws Exception {

private void assertIntermediateCatchEventUsingModel(BpmnModelInstance model) throws Exception {
Object expectedJsonResponse =
ConnectorsObjectMapperSupplier.getCopy()
.readValue(
"{\"message\":{\"consumerTag\":\"myConsumerTag\",\"body\":{\"foo\": {\"bar\": \"barValue\"}},\"properties\":{}}}",
Object.class);
this.objectMapper.readValue(
"{\"message\":{\"consumerTag\":\"myConsumerTag\",\"body\":{\"foo\": {\"bar\": \"barValue\"}},\"properties\":{}}}",
Object.class);

processStateStore.update(mockProcessDefinition(model));

Expand Down
Loading