Jelajahi Sumber

Added a test that verifies that groups are serialized and sent correctly using msgpack.

Ref #4710.
Omer Katz 7 tahun lalu
induk
melakukan
8a32f649c2
1 mengubah file dengan 12 tambahan dan 0 penghapusan
  1. 12 0
      t/integration/test_canvas.py

+ 12 - 0
t/integration/test_canvas.py

@@ -2,6 +2,7 @@ from __future__ import absolute_import, unicode_literals
 
 from datetime import datetime, timedelta
 
+from msgpack.exceptions import ExtraData
 import pytest
 
 from celery import chain, chord, group
@@ -245,6 +246,17 @@ class test_group:
 
         assert res.get(timeout=TIMEOUT) == [11, 101, 1001, 2001]
 
+    @flaky
+    @pytest.mark.xfail(raises=ExtraData, strict=True)
+    def test_group_msgpack(self, manager):
+        assert manager.inspect().ping()
+
+        chain(identity.si(b'arg'),
+              group([
+                    identity.si(b'arg1'),
+                    identity.si(b'arg2')
+              ])).delay(serializer='msgpack')
+
 
 def assert_ids(r, expected_value, expected_root_id, expected_parent_id):
     root_id, parent_id, value = r.get(timeout=TIMEOUT)