Skip to content

Commit 800e034

Browse files
committed
fix test
1 parent 14dfb9c commit 800e034

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

inspectit-gepard-agent/src/main/java/rocks/inspectit/gepard/agent/internal/identity/model/AgentInfo.java

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/** Meta-information about the current agent */
1616
public final class AgentInfo {
1717

18+
/** Global instance of agent information */
1819
public static final AgentInfo INFO = new AgentInfo();
1920

2021
private final Agent agent;
@@ -29,6 +30,12 @@ private AgentInfo() {
2930
this.agentId = identityInfo.agentId();
3031
}
3132

33+
/**
34+
* Creates an agent model with the current meta-information.
35+
*
36+
* @param identityInfo the agent's identity info
37+
* @return the created agent model
38+
*/
3239
private Agent createAgent(IdentityInfo identityInfo) {
3340
RuntimeMXBean runtime = ManagementFactory.getRuntimeMXBean();
3441

inspectit-gepard-agent/src/test/java/rocks/inspectit/gepard/agent/notification/http/NotificationFactoryTest.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.fasterxml.jackson.annotation.JsonAutoDetect;
77
import com.fasterxml.jackson.annotation.PropertyAccessor;
88
import com.fasterxml.jackson.databind.ObjectMapper;
9+
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
910
import java.net.URISyntaxException;
1011
import org.apache.hc.client5.http.async.methods.SimpleHttpRequest;
1112
import org.junit.jupiter.api.Test;
@@ -15,7 +16,9 @@
1516
class NotificationFactoryTest {
1617

1718
private static final ObjectMapper mapper =
18-
new ObjectMapper().setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
19+
new ObjectMapper()
20+
.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY)
21+
.registerModule(new JavaTimeModule());
1922

2023
private final String agentId = AgentInfo.INFO.getAgentId();
2124

0 commit comments

Comments
 (0)