comparison Tests/Tests.py @ 147:ff788c99f1aa

test_lua_deadlock
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 16 Jul 2018 11:19:42 +0200
parents 69fecf5a3ff6
children 4a533d003080
comparison
equal deleted inserted replaced
146:5ba7b2417544 147:ff788c99f1aa
3768 3768
3769 self.assertEqual('1.2.840.10008.1.2.4.91', m['TransferSyntax']) 3769 self.assertEqual('1.2.840.10008.1.2.4.91', m['TransferSyntax'])
3770 self.assertEqual('1.2.840.10008.5.1.4.1.1.4', m['SopClassUid']) 3770 self.assertEqual('1.2.840.10008.5.1.4.1.1.4', m['SopClassUid'])
3771 self.assertEqual('1', m['IndexInSeries']) 3771 self.assertEqual('1', m['IndexInSeries'])
3772 self.assertTrue('ReceptionDate' in m) 3772 self.assertTrue('ReceptionDate' in m)
3773
3774
3775 def test_lua_deadlock(self):
3776 # Rana Asim Wajid (2018-07-14): "It does seem that the issue
3777 # is with the lua script I'm using for conversion of images to
3778 # JPEG2000. When the script is used with 1.4.0 the first
3779 # instance appears to be stored and then everything just
3780 # halts, ie Orthanc wont respond to anything after that."
3781 # https://groups.google.com/d/msg/orthanc-users/Rc-Beb42xc8/JUgdzrmCAgAJ
3782 InstallLuaScript('Lua/Jpeg2000Conversion.lua')
3783
3784 subprocess.check_call([ FindExecutable('storescu'),
3785 _REMOTE['Server'], str(_REMOTE['DicomPort']),
3786 GetDatabasePath('Brainix/Flair/IM-0001-0001.dcm'),
3787 GetDatabasePath('Brainix/Flair/IM-0001-0002.dcm'),
3788 ])
3789
3790 instances = DoGet(_REMOTE, '/instances')
3791 self.assertEqual(2, len(instances))
3792
3793 t1 = DoGet(_REMOTE, '/instances/%s/metadata/TransferSyntax' % instances[0])
3794 t2 = DoGet(_REMOTE, '/instances/%s/metadata/TransferSyntax' % instances[1])
3795 self.assertEqual('1.2.840.10008.1.2.4.90', t1)
3796 self.assertEqual(t1, t2);