-
Notifications
You must be signed in to change notification settings - Fork 0
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
PRMT-3411 #25
base: main
Are you sure you want to change the base?
PRMT-3411 #25
Conversation
String port = "5432"; | ||
return "jdbc:postgresql://" + hostname + ":" + port + "/" + dbname + "?user=" + username + "&password=" + password; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say the port probably doesn't need a variable of it's own!
String port = "5432"; | |
return "jdbc:postgresql://" + hostname + ":" + port + "/" + dbname + "?user=" + username + "&password=" + password; | |
return "jdbc:postgresql://" + hostname + ":5432/"+ dbname + "?user=" + username + "&password=" + password; |
// change transfer db status to ACTION:EHR_REQUEST_SENT before putting on inbound queue | ||
// Put the patient into inboundQueueFromMhs as a UK05 message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove these comments please?
String inboundConversationId = UUID.randomUUID().toString(); | ||
String outboundConversationId = UUID.randomUUID().toString(); | ||
LOGGER.info(" =============== outboundConversationId: {}", outboundConversationId); | ||
|
||
String largeEhrCoreMessageId = UUID.randomUUID().toString(); | ||
String fragment1MessageId = UUID.randomUUID().toString(); | ||
String fragment2MessageId = UUID.randomUUID().toString(); | ||
|
||
String nhsNumberForTestPatient = "9727018157"; | ||
String previousGpForTestPatient = "N82668"; | ||
String newGpForTestPatient = "M85019"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just popping this in as a note to the discussion we just had - would be beneficial to identify areas that are repeated throughout tests and abstract them out into small POJO's - the builder pattern would be great here!
@Autowired | ||
public EhrOutE2ETests( | ||
TrackerDb trackerDb, | ||
Gp2gpMessengerQueue gp2gpMessengerQueue, | ||
TestConfiguration config | ||
) { | ||
this.trackerDb = trackerDb; | ||
this.gp2gpMessengerQueue = gp2gpMessengerQueue; | ||
this.config = config; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can substitute this for the following:
@Autowired | |
public EhrOutE2ETests( | |
TrackerDb trackerDb, | |
Gp2gpMessengerQueue gp2gpMessengerQueue, | |
TestConfiguration config | |
) { | |
this.trackerDb = trackerDb; | |
this.gp2gpMessengerQueue = gp2gpMessengerQueue; | |
this.config = config; | |
} | |
@AllArgsConstructor(onConstructor = @__(@Autowired)) |
at class level!
String inboundConversationId = UUID.randomUUID().toString(); | ||
String smallEhrMessageId = UUID.randomUUID().toString(); | ||
String outboundConversationId = UUID.randomUUID().toString(); | ||
String nhsNumberForTestPatient = "9727018440"; | ||
String previousGpForTestPatient = "M85019"; | ||
String asidCodeForTestPatient = "200000000149"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just popping this in as a note to the discussion we just had - would be beneficial to identify areas that are repeated throughout tests and abstract them out into small POJO's - the builder pattern would be great here!
String asidCodeForTestPatient = "200000000149"; | ||
LOGGER.info(" =============== outboundConversationId: {}", outboundConversationId); | ||
|
||
SimpleAmqpQueue inboundQueueFromMhs = new SimpleAmqpQueue(config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this to an instance variable? :)
SimpleAmqpQueue inboundQueueFromMhs = new SimpleAmqpQueue(config); | |
private static final SimpleAmqpQueue MHS_INBOUND_QUEUE = new SimpleAmqpQueue(config); |
private SqsMessage findMessageContaining(String substring) { | ||
List<SqsMessage> allMessages = thinlyWrappedSqsClient.readThroughMessages(this.queueUri, 180); | ||
for (SqsMessage message : allMessages) { | ||
log(String.format("just finding message, checking conversationId: %s", this.queueUri)); | ||
log(String.format("Finding message with substring %s on queue: %s", substring, this.queueUri)); | ||
if (message.contains(substring)) { | ||
return message; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private SqsMessage findMessageContaining(String substring) {
return thinlyWrappedSqsClient.readThroughMessages(this.queueUri, 180)
.stream()
.filter(message -> message.contains(substring))
.findFirst()
.orElseThrow(RuntimeException::new);
}
testImplementation 'org.jooq:jooq-codegen:3.13.4' | ||
testImplementation 'org.jooq:jooq-meta:3.13.4' | ||
testImplementation 'org.jooq:jooq:3.13.4' | ||
testImplementation 'org.postgresql:postgresql:42.5.4' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminder: We want to remove these dependencies as we no longer use JOOQ.
No description provided.