From 554f591eb645510c3208edffaf0307c7b80cc39e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 16 Nov 2015 18:19:54 +0000 Subject: work around some 'tests' errors --- OpenSim/Data/Tests/RegionTests.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim/Data/Tests/RegionTests.cs') diff --git a/OpenSim/Data/Tests/RegionTests.cs b/OpenSim/Data/Tests/RegionTests.cs index 8d4249a..e1503d0 100644 --- a/OpenSim/Data/Tests/RegionTests.cs +++ b/OpenSim/Data/Tests/RegionTests.cs @@ -39,6 +39,7 @@ using OpenSim.Tests.Common; using log4net; using System.Reflection; using System.Data.Common; +using System.Threading; // DBMS-specific: using MySql.Data.MySqlClient; @@ -259,7 +260,7 @@ namespace OpenSim.Data.Tests uint localid = localID+1; localID = localID + 1; string name = "Adam West"; - byte material = (byte) random.Next(127); + byte material = (byte) random.Next((int)SOPMaterialData.MaxMaterial); ulong regionh = (ulong)random.NextDouble() * (ulong)random.Next(); int pin = random.Next(); Byte[] partsys = new byte[8]; @@ -433,7 +434,7 @@ namespace OpenSim.Data.Tests TaskInventoryDictionary dic = new TaskInventoryDictionary(); localID = localID + 1; string name = "West Adam"; - byte material = (byte) random.Next(127); + byte material = (byte) random.Next((int)SOPMaterialData.MaxMaterial); ulong regionh = (ulong)random.NextDouble() * (ulong)random.Next(); int pin = random.Next(); Byte[] partsys = new byte[8]; @@ -960,6 +961,9 @@ namespace OpenSim.Data.Tests double[,] t1 = GenTerrain(height1); db.StoreTerrain(t1, region1); + // store terrain is async + Thread.Sleep(1000); + Assert.That(db.LoadTerrain(zero), Is.Null); Assert.That(db.LoadTerrain(region1), Is.Not.Null); Assert.That(db.LoadTerrain(region2), Is.Null); @@ -987,6 +991,9 @@ namespace OpenSim.Data.Tests double[,] baseterrain2 = GenTerrain(height2); db.StoreTerrain(baseterrain2, region1); + // store terrain is async + Thread.Sleep(1000); + double[,] t1 = db.LoadTerrain(region1); Assert.That(CompareTerrain(t1, baseterrain1), Is.False); Assert.That(CompareTerrain(t1, baseterrain2), Is.True); -- cgit v1.1