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

Service code cleanup #925

Merged
merged 1 commit into from
Jun 14, 2023
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
2 changes: 0 additions & 2 deletions src/main/java/io/nats/service/Service.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public class Service {
// ? do we need an internal dispatcher for any user endpoints
// ! also while we are here, we need to collect the endpoints for the SchemaResponse
Dispatcher dTemp = null;
List<String> infoSubjects = new ArrayList<>();
List<Endpoint> infoEndpoints = new ArrayList<>();
serviceContexts = new HashMap<>();
for (ServiceEndpoint se : b.serviceEndpoints.values()) {
Expand All @@ -76,7 +75,6 @@ public class Service {
else {
serviceContexts.put(se.getName(), new EndpointContext(conn, null, true, se));
}
infoSubjects.add(se.getSubject());
infoEndpoints.add(se.getEndpoint());
}
if (dTemp != null) {
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/io/nats/service/ServiceTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -992,9 +992,9 @@ public void testServiceResponsesConstruction() {
iae = assertThrows(IllegalArgumentException.class, () -> new TestServiceResponses(json4.getBytes()));
assertTrue(iae.getMessage().contains("Version cannot be null"));

Map<String, String> meta = new HashMap<>();
meta.put("foo", "bar");
Endpoint end1 = new Endpoint("endfoo", meta);
Map<String, String> endMeta = new HashMap<>();
endMeta.put("foo", "bar");
Endpoint end1 = new Endpoint("endfoo", endMeta);
InfoResponse ir1 = new InfoResponse("id", "name", "0.0.0", metadata, "desc", Collections.singletonList(end1));
InfoResponse ir2 = new InfoResponse(ir1.toJson().getBytes());
System.out.println(ir1.toJson());
Expand Down Expand Up @@ -1161,4 +1161,4 @@ public void testInboxSupplier() throws Exception {
assertTrue(supplier.wasCalled);
});
}
}
}