From 18f04fb8acafacd933c3cd46fb38859045543889 Mon Sep 17 00:00:00 2001 From: "Matthew M. Keeler" Date: Fri, 9 Feb 2024 14:00:17 -0500 Subject: [PATCH] fix: Ensure anonymous context is valid --- .github/actions/ci/action.yml | 2 +- LaunchDarkly/LaunchDarkly/Models/Context/LDContext.swift | 1 + Makefile | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/ci/action.yml b/.github/actions/ci/action.yml index b9dbf9d0..28db1945 100644 --- a/.github/actions/ci/action.yml +++ b/.github/actions/ci/action.yml @@ -82,4 +82,4 @@ runs: shell: bash # Add a brief sleep here to ensure the test service is ready to receive # requests - run: sleep 10 && make run-contract-tests + run: make run-contract-tests diff --git a/LaunchDarkly/LaunchDarkly/Models/Context/LDContext.swift b/LaunchDarkly/LaunchDarkly/Models/Context/LDContext.swift index c3a9f0da..28ea2666 100644 --- a/LaunchDarkly/LaunchDarkly/Models/Context/LDContext.swift +++ b/LaunchDarkly/LaunchDarkly/Models/Context/LDContext.swift @@ -43,6 +43,7 @@ public struct LDContext: Encodable, Equatable { init() { self.init(canonicalizedKey: LDContext.defaultKey(kind: Kind.user)) + self.key = self.canonicalizedKey } struct Meta: Codable { diff --git a/Makefile b/Makefile index 34445b97..ad50a02b 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ start-contract-test-service-bg: run-contract-tests: @curl -s https://raw.githubusercontent.com/launchdarkly/sdk-test-harness/master/downloader/run.sh \ - | VERSION=v2 PARAMS="-url http://localhost:8080 -debug -stop-service-at-end -skip-from ./ContractTests/testharness-suppressions.txt $(TEST_HARNESS_PARAMS)" sh + | VERSION=v2 PARAMS="-url http://localhost:8080 -debug -status-timeout 120 -stop-service-at-end -skip-from ./ContractTests/testharness-suppressions.txt $(TEST_HARNESS_PARAMS)" sh contract-tests: start-contract-test-service-bg run-contract-tests