diff options
author | Justin Clarke Casey | 2009-04-14 17:44:10 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-04-14 17:44:10 +0000 |
commit | e1c449b492a08b95e9f4ea0556b6ec77f32ef0e7 (patch) | |
tree | b2a678fcd49554c33ca354590cebb0b8ced34896 /OpenSim/Framework/Communications/Tests/Cache | |
parent | Changing the CAP seed to be the string representation of a full UUID, instead... (diff) | |
download | opensim-SC_OLD-e1c449b492a08b95e9f4ea0556b6ec77f32ef0e7.zip opensim-SC_OLD-e1c449b492a08b95e9f4ea0556b6ec77f32ef0e7.tar.gz opensim-SC_OLD-e1c449b492a08b95e9f4ea0556b6ec77f32ef0e7.tar.bz2 opensim-SC_OLD-e1c449b492a08b95e9f4ea0556b6ec77f32ef0e7.tar.xz |
* Change simple asset cache test to manually pump the asset server rather than relying on another thread
Diffstat (limited to 'OpenSim/Framework/Communications/Tests/Cache')
-rw-r--r-- | OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs index 264bfe1..5d6bc8d 100644 --- a/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs +++ b/OpenSim/Framework/Communications/Tests/Cache/AssetCacheTests.cs | |||
@@ -62,15 +62,14 @@ namespace OpenSim.Framework.Communications.Tests | |||
62 | TestAssetDataPlugin assetPlugin = new TestAssetDataPlugin(); | 62 | TestAssetDataPlugin assetPlugin = new TestAssetDataPlugin(); |
63 | assetPlugin.CreateAsset(asset); | 63 | assetPlugin.CreateAsset(asset); |
64 | 64 | ||
65 | IAssetServer assetServer = new SQLAssetServer(assetPlugin); | 65 | SQLAssetServer assetServer = new SQLAssetServer(assetPlugin); |
66 | IAssetCache assetCache = new AssetCache(assetServer); | 66 | IAssetCache assetCache = new AssetCache(assetServer); |
67 | assetServer.Start(); | 67 | |
68 | 68 | assetCache.GetAsset(assetId, AssetRequestCallback, false); | |
69 | lock (this) | 69 | |
70 | { | 70 | // Manually pump the asset server |
71 | assetCache.GetAsset(assetId, AssetRequestCallback, false); | 71 | while (assetServer.HasWaitingRequests()) |
72 | Monitor.Wait(this, 60000); | 72 | assetServer.ProcessNextRequest(); |
73 | } | ||
74 | 73 | ||
75 | Assert.That( | 74 | Assert.That( |
76 | assetId, Is.EqualTo(m_assetIdReceived), "Asset id stored differs from asset id received"); | 75 | assetId, Is.EqualTo(m_assetIdReceived), "Asset id stored differs from asset id received"); |