* Reintroduce save iar test, which wasn't working because the asset service hadn't been manually post intiailized

0.6.6-post-fixes
Justin Clarke Casey 2009-05-22 19:59:45 +00:00
parent 6d6d8445b9
commit a3145e4e5a
2 changed files with 11 additions and 11 deletions

View File

@ -66,7 +66,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
/// <summary> /// <summary>
/// Test saving a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet). /// Test saving a V0.1 OpenSim Inventory Archive (subject to change since there is no fixed format yet).
/// </summary> /// </summary>
//[Test] [Test]
public void TestSaveIarV0_1() public void TestSaveIarV0_1()
{ {
TestHelper.InMethod(); TestHelper.InMethod();
@ -127,10 +127,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
lock (this) lock (this)
{ {
archiverModule.ArchiveInventory(userFirstName, userLastName, "Objects", archiveWriteStream); archiverModule.ArchiveInventory(userFirstName, userLastName, "Objects", archiveWriteStream);
//AssetServerBase assetServer = (AssetServerBase)scene.CommsManager.AssetCache.AssetServer;
//while (assetServer.HasWaitingRequests())
// assetServer.ProcessNextRequest();
Monitor.Wait(this, 60000); Monitor.Wait(this, 60000);
} }
@ -160,9 +156,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
string filePath; string filePath;
TarArchiveReader.TarEntryType tarEntryType; TarArchiveReader.TarEntryType tarEntryType;
Console.WriteLine("Reading archive");
while (tar.ReadEntry(out filePath, out tarEntryType) != null) while (tar.ReadEntry(out filePath, out tarEntryType) != null)
{ {
//Console.WriteLine("Got {0}", filePath); Console.WriteLine("Got {0}", filePath);
// if (ArchiveConstants.CONTROL_FILE_PATH == filePath) // if (ArchiveConstants.CONTROL_FILE_PATH == filePath)
// { // {
@ -171,13 +169,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH) && filePath.EndsWith(".xml")) if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH) && filePath.EndsWith(".xml"))
{ {
string fileName = filePath.Remove(0, "Objects/".Length); // string fileName = filePath.Remove(0, "Objects/".Length);
//
if (fileName.StartsWith(part1.Name)) // if (fileName.StartsWith(part1.Name))
{ // {
Assert.That(filePath, Is.EqualTo(expectedObject1FilePath)); Assert.That(filePath, Is.EqualTo(expectedObject1FilePath));
gotObject1File = true; gotObject1File = true;
} // }
// else if (fileName.StartsWith(part2.Name)) // else if (fileName.StartsWith(part2.Name))
// { // {
// Assert.That(fileName, Is.EqualTo(expectedObject2FileName)); // Assert.That(fileName, Is.EqualTo(expectedObject2FileName));

View File

@ -136,6 +136,7 @@ namespace OpenSim.Tests.Common.Setup
assetService.AddRegion(testScene); assetService.AddRegion(testScene);
assetService.RegionLoaded(testScene); assetService.RegionLoaded(testScene);
testScene.AddRegionModule(assetService.Name, assetService); testScene.AddRegionModule(assetService.Name, assetService);
assetService.PostInitialise();
testScene.SetModuleInterfaces(); testScene.SetModuleInterfaces();
@ -176,6 +177,7 @@ namespace OpenSim.Tests.Common.Setup
IRegionModule m = (IRegionModule)module; IRegionModule m = (IRegionModule)module;
m.Initialise(scene, config); m.Initialise(scene, config);
scene.AddModule(m.Name, m); scene.AddModule(m.Name, m);
m.PostInitialise();
} }
else if (module is IRegionModuleBase) else if (module is IRegionModuleBase)
{ {