fix intermittent sql project test failure (#14148)

This commit is contained in:
Kim Santiago
2021-02-03 13:26:06 -08:00
committed by GitHub
parent 395dfd6c52
commit bcc73dfbcf

View File

@@ -740,10 +740,10 @@ export class Project {
referenceNode.appendChild(privateElement); referenceNode.appendChild(privateElement);
} }
public addSqlCmdVariableToProjFile(entry: SqlCmdVariableProjectEntry): void { public async addSqlCmdVariableToProjFile(entry: SqlCmdVariableProjectEntry): Promise<void> {
// Remove any entries with the same variable name. It'll be replaced with a new one // Remove any entries with the same variable name. It'll be replaced with a new one
if (Object.keys(this.sqlCmdVariables).includes(entry.variableName)) { if (Object.keys(this.sqlCmdVariables).includes(entry.variableName)) {
this.removeFromProjFile(entry); await this.removeFromProjFile(entry);
} }
const sqlCmdVariableNode = this.projFileXmlDoc.createElement(constants.SqlCmdVariable); const sqlCmdVariableNode = this.projFileXmlDoc.createElement(constants.SqlCmdVariable);
@@ -882,7 +882,7 @@ export class Project {
await this.addDatabaseReferenceToProjFile(<IDatabaseReferenceProjectEntry>entry); await this.addDatabaseReferenceToProjFile(<IDatabaseReferenceProjectEntry>entry);
break; break;
case EntryType.SqlCmdVariable: case EntryType.SqlCmdVariable:
this.addSqlCmdVariableToProjFile(<SqlCmdVariableProjectEntry>entry); await this.addSqlCmdVariableToProjFile(<SqlCmdVariableProjectEntry>entry);
break; // not required but adding so that we dont miss when we add new items break; // not required but adding so that we dont miss when we add new items
} }