mirror of https://github.com/dapr/quickstarts.git
Fixes test failure that could happen looking at Configuration values on 1.13 -> 1.14
Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>
This commit is contained in:
parent
2b78b3a0e0
commit
f4845e6d0e
|
|
@ -47,7 +47,7 @@ pip3 install -r requirements.txt
|
||||||
<!-- STEP
|
<!-- STEP
|
||||||
name: Run order-processor service
|
name: Run order-processor service
|
||||||
expected_stdout_lines:
|
expected_stdout_lines:
|
||||||
- '== APP == Configuration for orderId2 : value: "102"'
|
- '== APP == Configuration for orderId2 : 102'
|
||||||
- '== APP == Subscription ID is'
|
- '== APP == Subscription ID is'
|
||||||
expected_stderr_lines:
|
expected_stderr_lines:
|
||||||
output_match_mode: substring
|
output_match_mode: substring
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,11 @@ with DaprClient() as client:
|
||||||
# Get config items from the config store
|
# Get config items from the config store
|
||||||
for key in CONFIGURATION_KEYS:
|
for key in CONFIGURATION_KEYS:
|
||||||
resp = client.get_configuration(store_name=DAPR_CONFIGURATION_STORE, keys=[key], config_metadata={})
|
resp = client.get_configuration(store_name=DAPR_CONFIGURATION_STORE, keys=[key], config_metadata={})
|
||||||
print(f"Configuration for {key} : {resp.items[key]}", flush=True)
|
print(f"Configuration for {key} : {resp.items[key].value}", flush=True)
|
||||||
|
|
||||||
def handler(id: str, resp: ConfigurationResponse):
|
def handler(id: str, resp: ConfigurationResponse):
|
||||||
for key in resp.items:
|
for key in resp.items:
|
||||||
print("Configuration update {'"+key+"' : {'value': '"+ resp.items[key].value +"'}}", flush=True)
|
print(f"Configuration update {key} : {resp.items[key].value}", flush=True)
|
||||||
|
|
||||||
|
|
||||||
async def subscribe_config():
|
async def subscribe_config():
|
||||||
|
|
@ -38,6 +38,3 @@ async def subscribe_config():
|
||||||
print("Error unsubscribing from config updates", flush=True)
|
print("Error unsubscribing from config updates", flush=True)
|
||||||
|
|
||||||
asyncio.run(subscribe_config())
|
asyncio.run(subscribe_config())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue