From 1a76ed127a8e178aea46fb3cb1f2c251aa4602ef Mon Sep 17 00:00:00 2001 From: "$(git --no-pager log --format=format:'%an' -n 1)" Date: Wed, 6 Nov 2024 15:29:55 -0800 Subject: [PATCH] Remove test that was using internal graphql-java API which has been changed. Because this test is in a legacy module it's not worth fixing. --- .../graphql/dgs/mvc/DgsRestControllerTest.kt | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsRestControllerTest.kt b/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsRestControllerTest.kt index 828777d81..96eeed992 100644 --- a/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsRestControllerTest.kt +++ b/graphql-dgs-spring-webmvc/src/test/kotlin/com/netflix/graphql/dgs/mvc/DgsRestControllerTest.kt @@ -19,7 +19,6 @@ package com.netflix.graphql.dgs.mvc import com.fasterxml.jackson.databind.ObjectMapper import com.netflix.graphql.dgs.DgsQueryExecutor import graphql.ExecutionResultImpl -import graphql.execution.reactive.SubscriptionPublisher import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import org.mockito.ArgumentCaptor @@ -170,26 +169,6 @@ class DgsRestControllerTest { } } - @Test - fun `Return an error when a Subscription is attempted on the Graphql Endpoint`() { - val queryString = "subscription { stocks { name } }" - - `when`(dgsQueryExecutor.execute(eq(queryString), eq(emptyMap()), any(), any(), any(), any())).thenReturn( - ExecutionResultImpl.newExecutionResult().data(SubscriptionPublisher(null, null)).build(), - ) - - mvc - .post("/graphql") { - contentType = MediaType.APPLICATION_JSON - content = objectMapper.writeValueAsString(mapOf("query" to queryString)) - }.andExpect { - status { isBadRequest() } - content { - string("Trying to execute subscription on /graphql. Use /subscriptions instead!") - } - } - } - @Test fun `Returns a request error if the no body is present`() { mvc