git tests: add debug logs for test failures "no changelist for conflicts created"

This commit is contained in:
Kirill Likhodedov
2017-11-19 16:48:30 +03:00
parent d9be11b9db
commit af905259e4
@@ -199,8 +199,7 @@ class GitApplyChangesProcess(private val project: Project,
}
val changes = actualList.changes
if (changes.isEmpty()) {
val changesString = changeListManager.changeLists.map { it -> "[${it.name}] ${it.changes}" }
LOG.debug("No changes in the $actualList. All changes in the CLM: $changesString")
LOG.debug("No changes in the $actualList. All changes in the CLM: ${getAllChangesInLogFriendlyPresentation(changeListManager)}")
alreadyPicked.add(commit)
return true
}
@@ -220,6 +219,9 @@ class GitApplyChangesProcess(private val project: Project,
}
}
private fun getAllChangesInLogFriendlyPresentation(changeListManagerEx: ChangeListManagerEx) =
changeListManagerEx.changeLists.map { it -> "[${it.name}] ${it.changes}" }
private fun waitForChangeListManagerUpdate() {
val waiter = CountDownLatch(1)
changeListManager.invokeAfterUpdate({
@@ -252,7 +254,8 @@ class GitApplyChangesProcess(private val project: Project,
private fun removeChangeListIfEmpty(changeList: LocalChangeList) {
val actualList = changeListManager.getChangeList(changeList.id)
if (actualList != null && actualList.changes.isEmpty()) {
LOG.debug("Changelist $actualList is empty, removing.")
LOG.debug("Changelist $actualList is empty, removing. " +
"All changes in the CLM: ${getAllChangesInLogFriendlyPresentation(changeListManager)}")
changeListManager.removeChangeList(actualList)
}
}