瀏覽代碼

Hook on different place, fix heisenbug.

Herby Vojčík 7 年之前
父節點
當前提交
b55074553e
共有 1 個文件被更改,包括 10 次插入10 次删除
  1. 10 10
      src/Znock/ZnockClient.class.st

+ 10 - 10
src/Znock/ZnockClient.class.st

@@ -14,16 +14,6 @@ ZnockClient class >> newWithInterceptor: aZnock [
 		yourself
 ]
 
-{ #category : #'private protocol' }
-ZnockClient >> executeRequestResponse [
-	| expectation |
-	expectation := interceptor consumeExpectationFor: self.
-	expectation ifNil: [ ^ super executeRequestResponse ].
-	expectation delay ifNotNil: [ :delay | self fakeDelay: delay ].
-	self fakeResponse: expectation response.
-	^ response contents
-]
-
 { #category : #'private protocol' }
 ZnockClient >> fakeDelay: aDuration [
 	| localTimeout |
@@ -39,6 +29,16 @@ ZnockClient >> fakeResponse: aZnResponse [
 	(response respondsTo: #signal) ifTrue: [ response signal ]
 ]
 
+{ #category : #'private protocol' }
+ZnockClient >> getConnectionAndExecute [
+	| expectation |
+	expectation := interceptor consumeExpectationFor: self.
+	expectation ifNil: [ ^ super executeRequestResponse ].
+	expectation delay ifNotNil: [ :delay | self fakeDelay: delay ].
+	self fakeResponse: expectation response.
+	^ response contents
+]
+
 { #category : #accessing }
 ZnockClient >> interceptor: anObject [
 	interceptor := anObject