@@ -83,31 +83,30 @@ def _wait_for_ready_integration(mode, integration):
83
83
# Wait for an integration to reach its running state and not only that but
84
84
# also be in a state where it can immediately execute incoming requests.
85
85
def await_start (mode , integration ):
86
- # Only needed when operator is used.
87
- if mode .is_local ():
88
- return True
89
-
90
86
# Check logs of the integration to make sure it was installed properly.
91
- invocation = kamel .log (mode , integration .integration_name ,
92
- "Installed features:" )
93
- integration_is_running = invocation is not None
94
- if integration_is_running :
95
- print (f'Integration { integration .integration_name } is running.' )
96
- else :
97
- print ('Integration did not start correctly.' )
87
+ if not mode .is_local ():
88
+ invocation = kamel .log (mode , integration .integration_name ,
89
+ "Installed features:" )
90
+ integration_is_running = invocation is not None
91
+ if integration_is_running :
92
+ print (f'Integration { integration .integration_name } is running.' )
93
+ else :
94
+ print ('Integration did not start correctly.' )
98
95
99
96
# For kafka transport the health check cannot be performed.
100
97
if mode .transport == 'kafka' :
101
98
return True
102
99
103
- # Perform health check and wait for integration to be ready.
100
+ # Perform readiness check and wait for integration to be ready.
104
101
healthy_integration = _wait_for_ready_integration (mode , integration )
105
102
106
103
if healthy_integration :
107
- print (f'Integration { integration .integration_name } is healthy.' )
108
- return integration_is_running
104
+ print (f'Integration { integration .integration_name } is ready.' )
105
+ if not mode .is_local ():
106
+ return integration_is_running
107
+ return True
109
108
110
- print (f'Integration { integration .integration_name } is not healthy .' )
109
+ print (f'Integration { integration .integration_name } cannot be ready .' )
111
110
return False
112
111
113
112
0 commit comments