summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/hashserv/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/hashserv/tests.py')
-rw-r--r--bitbake/lib/hashserv/tests.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/bitbake/lib/hashserv/tests.py b/bitbake/lib/hashserv/tests.py
index a5472a996d..6e86295079 100644
--- a/bitbake/lib/hashserv/tests.py
+++ b/bitbake/lib/hashserv/tests.py
@@ -99,6 +99,29 @@ class TestHashEquivalenceServer(object):
99 result = self.client.get_unihash(self.METHOD, taskhash) 99 result = self.client.get_unihash(self.METHOD, taskhash)
100 self.assertEqual(result, unihash) 100 self.assertEqual(result, unihash)
101 101
102 def test_huge_message(self):
103 # Simple test that hashes can be created
104 taskhash = 'c665584ee6817aa99edfc77a44dd853828279370'
105 outhash = '3c979c3db45c569f51ab7626a4651074be3a9d11a84b1db076f5b14f7d39db44'
106 unihash = '90e9bc1d1f094c51824adca7f8ea79a048d68824'
107
108 result = self.client.get_unihash(self.METHOD, taskhash)
109 self.assertIsNone(result, msg='Found unexpected task, %r' % result)
110
111 siginfo = "0" * (self.client.max_chunk * 4)
112
113 result = self.client.report_unihash(taskhash, self.METHOD, outhash, unihash, {
114 'outhash_siginfo': siginfo
115 })
116 self.assertEqual(result['unihash'], unihash, 'Server returned bad unihash')
117
118 result = self.client.get_taskhash(self.METHOD, taskhash, True)
119 self.assertEqual(result['taskhash'], taskhash)
120 self.assertEqual(result['unihash'], unihash)
121 self.assertEqual(result['method'], self.METHOD)
122 self.assertEqual(result['outhash'], outhash)
123 self.assertEqual(result['outhash_siginfo'], siginfo)
124
102 def test_stress(self): 125 def test_stress(self):
103 def query_server(failures): 126 def query_server(failures):
104 client = Client(self.server.address) 127 client = Client(self.server.address)