Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't run in-memory cache tests during SQLite cache testing #1010

Merged
merged 2 commits into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Tests/ApolloCacheDependentTests/FetchQueryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ class FetchQueryTests: XCTestCase {
}

func testThreadedCache() throws {
#if canImport(ApolloSQLite)
print("THIS ONLY TESTS THE IN-MEMORY CACHE")
#else
let cache = InMemoryNormalizedCache()

let networkTransport1 = MockNetworkTransport(body: [
Expand Down Expand Up @@ -476,5 +479,6 @@ class FetchQueryTests: XCTestCase {
for watcher in watchers {
watcher.cancel()
}
#endif
}
}
8 changes: 4 additions & 4 deletions Tests/StarWarsAPI/API.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5558,7 +5558,7 @@ public final class StarshipQuery: GraphQLQuery {

public final class StarshipCoordinatesQuery: GraphQLQuery {
/// The raw GraphQL definition of this operation.
public let operationDefinition =
public let operationDefinition: String =
"""
query StarshipCoordinates($coordinates: [[Float!]!]) {
starshipCoordinates(coordinates: $coordinates) {
Expand All @@ -5570,7 +5570,7 @@ public final class StarshipCoordinatesQuery: GraphQLQuery {
}
"""

public let operationName = "StarshipCoordinates"
public let operationName: String = "StarshipCoordinates"

public let operationIdentifier: String? = "8dd77d4bc7494c184606da092a665a7c2ca3c2a3f14d3b23fa5e469e207b3406"

Expand All @@ -5585,7 +5585,7 @@ public final class StarshipCoordinatesQuery: GraphQLQuery {
}

public struct Data: GraphQLSelectionSet {
public static let possibleTypes = ["Query"]
public static let possibleTypes: [String] = ["Query"]

public static let selections: [GraphQLSelection] = [
GraphQLField("starshipCoordinates", arguments: ["coordinates": GraphQLVariable("coordinates")], type: .object(StarshipCoordinate.selections)),
Expand All @@ -5611,7 +5611,7 @@ public final class StarshipCoordinatesQuery: GraphQLQuery {
}

public struct StarshipCoordinate: GraphQLSelectionSet {
public static let possibleTypes = ["Starship"]
public static let possibleTypes: [String] = ["Starship"]

public static let selections: [GraphQLSelection] = [
GraphQLField("__typename", type: .nonNull(.scalar(String.self))),
Expand Down