Fix flaky project rename test (#7794)

Fixes the _RefactoringTests - rename project_ part of the #7775


Changelog:
- update: send the ok response before the notification to fix the order of events in tests
This commit is contained in:
Dmitry Bushev 2023-09-12 13:24:12 +01:00 committed by GitHub
parent 6fd2295cc6
commit a7fc333ff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,6 +60,7 @@ class RenameProjectHandler(timeout: FiniteDuration, runtimeConnector: ActorRef)
_,
Api.ProjectRenamed(oldNormalizedName, newNormalizedName, newName)
) =>
replyTo ! ResponseResult(RenameProject, id, Unused)
context.system.eventStream.publish(
RefactoringProtocol.ProjectRenamedNotification(
oldNormalizedName,
@ -67,7 +68,6 @@ class RenameProjectHandler(timeout: FiniteDuration, runtimeConnector: ActorRef)
newName
)
)
replyTo ! ResponseResult(RenameProject, id, Unused)
cancellable.cancel()
context.stop(self)