[rygel] tests: Adjust byte sizes to better test seeking



commit 7050e16684247174692a0d666605a0f4b2ca85b2
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Apr 4 22:57:17 2011 +0300

    tests: Adjust byte sizes to better test seeking

 tests/rygel-http-gst-response-test.vala |    7 +++----
 tests/rygel-http-response-test.vala     |    2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/tests/rygel-http-gst-response-test.vala b/tests/rygel-http-gst-response-test.vala
index f7834d2..16137eb 100644
--- a/tests/rygel-http-gst-response-test.vala
+++ b/tests/rygel-http-gst-response-test.vala
@@ -114,9 +114,8 @@ public class Rygel.HTTPGetHandler : GLib.Object {
 }
 
 public class Rygel.MediaItem {
-    private static const long BLOCK_SIZE = HTTPResponseTest.MAX_BYTES / 16;
-    private static const long MAX_BUFFERS =
-                                        HTTPResponseTest.MAX_BYTES / BLOCK_SIZE;
+    private static const long BLOCK_SIZE = HTTPResponseTest.MAX_BYTES / 16 + 1;
+    private static const long MAX_BUFFERS = 25;
 
     public int64 size {
         get {
@@ -136,7 +135,7 @@ public class Rygel.MediaItem {
 
         this.src.blocksize = BLOCK_SIZE;
         this.src.num_buffers = MAX_BUFFERS;
-        this.src.sizemax = HTTPResponseTest.MAX_BYTES;
+        this.src.sizemax = MAX_BUFFERS * BLOCK_SIZE;
     }
 
     public Element? create_stream_source () {
diff --git a/tests/rygel-http-response-test.vala b/tests/rygel-http-response-test.vala
index 6d5478a..c3e6d8b 100644
--- a/tests/rygel-http-response-test.vala
+++ b/tests/rygel-http-response-test.vala
@@ -31,7 +31,7 @@ public errordomain Rygel.TestError {
 }
 
 public abstract class Rygel.HTTPResponseTest : GLib.Object {
-    public const long MAX_BYTES = 1024;
+    public const long MAX_BYTES = 102400;
 
     protected HTTPServer server;
     protected HTTPClient client;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]