Skip to content

Commit

Permalink
Merge pull request #1010 from apollographql/fix/cache
Browse files Browse the repository at this point in the history
Don't run in-memory cache tests during SQLite cache testing
  • Loading branch information
designatednerd authored Feb 12, 2020
2 parents 9f8fe8a + 27d07f6 commit 56072f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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

0 comments on commit 56072f0

Please sign in to comment.