summaryrefslogtreecommitdiffhomepage
path: root/test/test_node_application.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2018-12-04 19:05:10 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2018-12-04 19:05:10 +0300
commit2ef5011236b1088c2f8b460c2c13c07e9b727477 (patch)
treec8f0a42ec657e1da5669bb575aa435babb1bf76b /test/test_node_application.py
parentd500e29f8818247c1eb6fe38c0d802405aa2c283 (diff)
downloadunit-2ef5011236b1088c2f8b460c2c13c07e9b727477.tar.gz
unit-2ef5011236b1088c2f8b460c2c13c07e9b727477.tar.bz2
Tests: fixed test_node_application_write_callback.
Fixed the write() callback order test. Also introduced a separate test to verify the callback call itself.
Diffstat (limited to 'test/test_node_application.py')
-rw-r--r--test/test_node_application.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_node_application.py b/test/test_node_application.py
index 715173e6..b736058c 100644
--- a/test/test_node_application.py
+++ b/test/test_node_application.py
@@ -112,11 +112,14 @@ class TestUnitNodeApplication(unit.TestUnitApplicationNode):
self.assertEqual(self.get()['body'], '6\r\nbuffer\r\n0\r\n\r\n',
'write buffer')
+ @unittest.expectedFailure
def test_node_application_write_callback(self):
self.load('write_callback')
self.assertEqual(self.get()['body'],
- '5\r\nhello\r\n5\r\nworld\r\n0\r\n\r\n', 'write callback')
+ '5\r\nhello\r\n5\r\nworld\r\n0\r\n\r\n', 'write callback order')
+ self.assertTrue(self.waitforfiles(self.testdir + '/node/callback'),
+ 'write callback')
def test_node_application_write_before_writeHead(self):
self.skip_alerts.append(r'process \d+ exited on signal')