Skip to content

Commit

Permalink
Fixes test failure that could happen looking at Configuration values …
Browse files Browse the repository at this point in the history
…on 1.13 -> 1.14

Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com>
  • Loading branch information
paulyuk committed Jul 9, 2024
1 parent 2b78b3a commit f4845e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion configuration/python/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pip3 install -r requirements.txt
<!-- STEP
name: Run order-processor service
expected_stdout_lines:
- '== APP == Configuration for orderId2 : value: "102"'
- '== APP == Configuration for orderId2 : 102'
- '== APP == Subscription ID is'
expected_stderr_lines:
output_match_mode: substring
Expand Down
7 changes: 2 additions & 5 deletions configuration/python/sdk/order-processor/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
# Get config items from the config store
for key in CONFIGURATION_KEYS:
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):
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():
Expand All @@ -38,6 +38,3 @@ async def subscribe_config():
print("Error unsubscribing from config updates", flush=True)

asyncio.run(subscribe_config())



0 comments on commit f4845e6

Please sign in to comment.