зеркало из https://github.com/mono/corefx.git
Close file in XmlSchemaSet tests in attempt to fix intermittent test failure (#27825)
* close file in XmlSchemaSet tests in attempt to fix intermittent test failure * fix compilation problem
This commit is contained in:
Родитель
59f6987b7f
Коммит
303f204485
|
@ -635,15 +635,15 @@ namespace System.Xml.Tests
|
|||
string correctUri = Path.GetFullPath(path);
|
||||
_output.WriteLine("Include uri: " + includeUri);
|
||||
_output.WriteLine("Correct uri: " + correctUri);
|
||||
Stream s = new FileStream(Path.GetFullPath(path), FileMode.Open, FileAccess.Read, FileShare.Read, 1);
|
||||
XmlReader r = XmlReader.Create(s, new XmlReaderSettings(), includeUri);
|
||||
_output.WriteLine("Reader uri: " + r.BaseURI);
|
||||
XmlSchema som = null;
|
||||
using (r)
|
||||
using (Stream s = new FileStream(Path.GetFullPath(path), FileMode.Open, FileAccess.Read, FileShare.Read, 1))
|
||||
{
|
||||
som = XmlSchema.Read(r, new ValidationEventHandler(ValidationCallback));
|
||||
XmlReader r = XmlReader.Create(s, new XmlReaderSettings(), includeUri);
|
||||
_output.WriteLine("Reader uri: " + r.BaseURI);
|
||||
using (r)
|
||||
{
|
||||
return XmlSchema.Read(r, new ValidationEventHandler(ValidationCallback));
|
||||
}
|
||||
}
|
||||
return som;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче