diff options
author | UbitUmarov | 2015-11-16 18:19:54 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-16 18:19:54 +0000 |
commit | 554f591eb645510c3208edffaf0307c7b80cc39e (patch) | |
tree | 83d2cff28dae4c8e4687c7e283199b76dc023180 /OpenSim/Data/Tests | |
parent | coment out excessive debug messages (diff) | |
download | opensim-SC-554f591eb645510c3208edffaf0307c7b80cc39e.zip opensim-SC-554f591eb645510c3208edffaf0307c7b80cc39e.tar.gz opensim-SC-554f591eb645510c3208edffaf0307c7b80cc39e.tar.bz2 opensim-SC-554f591eb645510c3208edffaf0307c7b80cc39e.tar.xz |
work around some 'tests' errors
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/Tests/RegionTests.cs | 11 |
1 files changed, 9 insertions, 2 deletions
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; | |||
39 | using log4net; | 39 | using log4net; |
40 | using System.Reflection; | 40 | using System.Reflection; |
41 | using System.Data.Common; | 41 | using System.Data.Common; |
42 | using System.Threading; | ||
42 | 43 | ||
43 | // DBMS-specific: | 44 | // DBMS-specific: |
44 | using MySql.Data.MySqlClient; | 45 | using MySql.Data.MySqlClient; |
@@ -259,7 +260,7 @@ namespace OpenSim.Data.Tests | |||
259 | uint localid = localID+1; | 260 | uint localid = localID+1; |
260 | localID = localID + 1; | 261 | localID = localID + 1; |
261 | string name = "Adam West"; | 262 | string name = "Adam West"; |
262 | byte material = (byte) random.Next(127); | 263 | byte material = (byte) random.Next((int)SOPMaterialData.MaxMaterial); |
263 | ulong regionh = (ulong)random.NextDouble() * (ulong)random.Next(); | 264 | ulong regionh = (ulong)random.NextDouble() * (ulong)random.Next(); |
264 | int pin = random.Next(); | 265 | int pin = random.Next(); |
265 | Byte[] partsys = new byte[8]; | 266 | Byte[] partsys = new byte[8]; |
@@ -433,7 +434,7 @@ namespace OpenSim.Data.Tests | |||
433 | TaskInventoryDictionary dic = new TaskInventoryDictionary(); | 434 | TaskInventoryDictionary dic = new TaskInventoryDictionary(); |
434 | localID = localID + 1; | 435 | localID = localID + 1; |
435 | string name = "West Adam"; | 436 | string name = "West Adam"; |
436 | byte material = (byte) random.Next(127); | 437 | byte material = (byte) random.Next((int)SOPMaterialData.MaxMaterial); |
437 | ulong regionh = (ulong)random.NextDouble() * (ulong)random.Next(); | 438 | ulong regionh = (ulong)random.NextDouble() * (ulong)random.Next(); |
438 | int pin = random.Next(); | 439 | int pin = random.Next(); |
439 | Byte[] partsys = new byte[8]; | 440 | Byte[] partsys = new byte[8]; |
@@ -960,6 +961,9 @@ namespace OpenSim.Data.Tests | |||
960 | double[,] t1 = GenTerrain(height1); | 961 | double[,] t1 = GenTerrain(height1); |
961 | db.StoreTerrain(t1, region1); | 962 | db.StoreTerrain(t1, region1); |
962 | 963 | ||
964 | // store terrain is async | ||
965 | Thread.Sleep(1000); | ||
966 | |||
963 | Assert.That(db.LoadTerrain(zero), Is.Null); | 967 | Assert.That(db.LoadTerrain(zero), Is.Null); |
964 | Assert.That(db.LoadTerrain(region1), Is.Not.Null); | 968 | Assert.That(db.LoadTerrain(region1), Is.Not.Null); |
965 | Assert.That(db.LoadTerrain(region2), Is.Null); | 969 | Assert.That(db.LoadTerrain(region2), Is.Null); |
@@ -987,6 +991,9 @@ namespace OpenSim.Data.Tests | |||
987 | double[,] baseterrain2 = GenTerrain(height2); | 991 | double[,] baseterrain2 = GenTerrain(height2); |
988 | db.StoreTerrain(baseterrain2, region1); | 992 | db.StoreTerrain(baseterrain2, region1); |
989 | 993 | ||
994 | // store terrain is async | ||
995 | Thread.Sleep(1000); | ||
996 | |||
990 | double[,] t1 = db.LoadTerrain(region1); | 997 | double[,] t1 = db.LoadTerrain(region1); |
991 | Assert.That(CompareTerrain(t1, baseterrain1), Is.False); | 998 | Assert.That(CompareTerrain(t1, baseterrain1), Is.False); |
992 | Assert.That(CompareTerrain(t1, baseterrain2), Is.True); | 999 | Assert.That(CompareTerrain(t1, baseterrain2), Is.True); |