diff options
| author | Dan Engelbrecht <[email protected]> | 2022-05-09 22:38:27 +0200 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-05-09 22:38:27 +0200 |
| commit | 239e09c1df23e080c5d88cfb5d6af8eb63c232f9 (patch) | |
| tree | ad5be4694a714684a1be12a3df4548960336bb03 /zenserver/cache | |
| parent | Restore logic where we accept failed overwrite if resulting size is the same (diff) | |
| download | zen-239e09c1df23e080c5d88cfb5d6af8eb63c232f9.tar.xz zen-239e09c1df23e080c5d88cfb5d6af8eb63c232f9.zip | |
make test run on more platforms
Diffstat (limited to 'zenserver/cache')
| -rw-r--r-- | zenserver/cache/structuredcachestore.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp index b6fd44742..a4cab881f 100644 --- a/zenserver/cache/structuredcachestore.cpp +++ b/zenserver/cache/structuredcachestore.cpp @@ -3009,13 +3009,8 @@ TEST_CASE("z$.threadedinsert") // * doctest::skip(true)) } } -# if ZEN_PLATFORM_WINDOWS TEST_CASE("z$.blocked.disklayer.put") { - // On Windows platform we can't overwrite a standalone file that - // is open for read at the same time. - // Make sure the retry path runs and we get an exception - ScopedTemporaryDirectory TempDir; GcStorageSize CacheSize; @@ -3050,15 +3045,20 @@ TEST_CASE("z$.blocked.disklayer.put") CbObject CacheValue2 = CreateCacheValue(64 * 1024 + 64 + 1); IoBuffer Buffer2 = CacheValue2.GetBuffer().AsIoBuffer(); Buffer2.SetContentType(ZenContentType::kCbObject); - // Overwriting with different size should throw exception if file is held open +# if ZEN_PLATFORM_WINDOWS + // On Windows platform, overwriting with different size while we have + // it open for read should throw exception if file is held open CHECK_THROWS(Zcs.Put("test_bucket", HashKey, {.Value = Buffer2})); +# else + // Other platforms should handle overwrite just fine + Zcs.Put("test_bucket", HashKey, {.Value = Buffer2}); +# endif BufferGet = ZenCacheValue{}; // Read access has been removed, we should now be able to overwrite it Zcs.Put("test_bucket", HashKey, {.Value = Buffer2}); } -# endif #endif |