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

ID-925 Fix register-user integration test flakiness. #1246

Merged
merged 3 commits into from
Nov 20, 2023
Merged
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 @@ -31,10 +31,12 @@
def createUserWithProfile(userInfo: UserInfo, registerRequest: RegisterRequest): Future[PerRequestMessage] =
for {
registerResult <- registerUser(userInfo, registerRequest.acceptsTermsOfService)
_ <- thurloeDao.saveProfile(userInfo, registerRequest.profile)
_ <- thurloeDao.saveKeyValues(userInfo, Map("isRegistrationComplete" -> Profile.currentVersion.toString))
// We are using the equivalent value from sam registration to force the order of operations for the thurloe calls
registrationResultUserInfo = userInfo.copy(userEmail = registerResult.email.value)
_ <- thurloeDao.saveProfile(registrationResultUserInfo, registerRequest.profile)
_ <- thurloeDao.saveKeyValues(registrationResultUserInfo, Map("isRegistrationComplete" -> Profile.currentVersion.toString))
_ <- if (!registerResult.allowed) {
thurloeDao.saveKeyValues(userInfo, Map("email" -> userInfo.userEmail))
thurloeDao.saveKeyValues(registrationResultUserInfo, Map("email" -> userInfo.userEmail))

Check warning on line 39 in src/main/scala/org/broadinstitute/dsde/firecloud/service/RegisterService.scala

View check run for this annotation

Codecov / codecov/patch

src/main/scala/org/broadinstitute/dsde/firecloud/service/RegisterService.scala#L39

Added line #L39 was not covered by tests
} else Future.successful()
} yield RequestComplete(StatusCodes.OK, registerResult)

Expand Down
Loading