#NEWLINE# def test02_addColorCapabilitiesAllowsColorActors( self ) : #NEWLINE# #INDENT# self . startSystems ( 20 ) #NEWLINE# self . systems [ 'One' ] . updateCapability ( 'Red' , True ) #NEWLINE# self . systems [ 'Two' ] . updateCapability ( 'Green' , True ) #NEWLINE# self . systems [ 'Three' ] . updateCapability ( 'Blue' , True ) #NEWLINE# reasonableActorResponseTime = 0.2 #NEWLINE# time . sleep ( ( reasonableActorResponseTime * 3 ) ) #NEWLINE# red = self . systems [ 'One' ] . createActor ( RedActor ) #NEWLINE# green = self . systems [ 'One' ] . createActor ( GreenActor ) #NEWLINE# blue = self . systems [ 'One' ] . createActor ( BlueActor ) #NEWLINE# self . assertIsNotNone ( red ) #NEWLINE# self . assertIsNotNone ( blue ) #NEWLINE# self . assertIsNotNone ( blue ) #NEWLINE# self . assertIsInstance ( red , ActorAddress ) #NEWLINE# self . assertIsInstance ( green , ActorAddress ) #NEWLINE# self . assertIsInstance ( blue , ActorAddress ) #NEWLINE# self . assertEqual ( 'Got: hello' , self . systems [ 'One' ] . ask ( red , 'hello' , 1 ) ) #NEWLINE# self . assertEqual ( 'Got: howdy' , self . systems [ 'One' ] . ask ( green , 'howdy' , 1 ) ) #NEWLINE# self . assertEqual ( 'Got: greetings' , self . systems [ 'One' ] . ask ( blue , 'greetings' , 1 ) ) #NEWLINE# self . systems [ 'One' ] . tell ( red , ActorExitRequest ( ) ) #NEWLINE# self . systems [ 'One' ] . tell ( green , ActorExitRequest ( ) ) #NEWLINE# self . systems [ 'One' ] . tell ( blue , ActorExitRequest ( ) ) #NEWLINE# time . sleep ( 0.1 )