Skip to content

Commit

Permalink
Use handler queue for subscription callback (actual head of 2.9.2 rel…
Browse files Browse the repository at this point in the history
…ease)

Test cleanup
- Turn off code signing for test targets
- Update integration test credentials
- Separated waits for inverted expectations in long running tests
- Change test setup lifecycle to account for base query completed state; delta
  query may be invoked after base query is done, as in the case of a network
  failure)
  • Loading branch information
palpatim committed Jan 18, 2019
1 parent 512c133 commit da40e48
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 57 deletions.
10 changes: 5 additions & 5 deletions AWSAppSyncClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1010;
ORGANIZATIONNAME = "Amazon Web Services";
TargetAttributes = {
1700503521543E41008B16B6 = {
Expand Down Expand Up @@ -1702,7 +1702,7 @@
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down Expand Up @@ -1733,7 +1733,7 @@
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down Expand Up @@ -2065,7 +2065,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down Expand Up @@ -2094,7 +2094,7 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
3 changes: 2 additions & 1 deletion AWSAppSyncClient/Internal/AppSyncSubscriptionWithSync.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ final class AppSyncSubscriptionWithSync<Subscription: GraphQLSubscription, BaseQ
let semaphore = DispatchSemaphore(value: 0)

AppSyncLog.info("Initializing base query results from cache")
appSyncClient.fetch(query: baseQuery, cachePolicy: CachePolicy.returnCacheDataDontFetch) { [weak self] (result, error) in
appSyncClient.fetch(query: baseQuery, cachePolicy: .returnCacheDataDontFetch) { [weak self] (result, error) in
self?.baseQueryHandler(result, error)
semaphore.signal()
}
Expand Down Expand Up @@ -249,6 +249,7 @@ final class AppSyncSubscriptionWithSync<Subscription: GraphQLSubscription, BaseQ
do {
subscriptionWatcher = try appSyncClient.subscribeWithConnectCallback(
subscription: subscription,
queue: handlerQueue ?? DispatchQueue.main,
connectCallback: connectCallback,
resultHandler: resultHandler
)
Expand Down
Loading

0 comments on commit da40e48

Please sign in to comment.