diff --git a/faunadb-java/src/main/java/com/faunadb/client/types/MetricsResponse.java b/faunadb-java/src/main/java/com/faunadb/client/types/MetricsResponse.java index 7f958fd9..a693fd44 100644 --- a/faunadb-java/src/main/java/com/faunadb/client/types/MetricsResponse.java +++ b/faunadb-java/src/main/java/com/faunadb/client/types/MetricsResponse.java @@ -51,12 +51,10 @@ public enum Metrics { QUERY_BYTES_IN("x-query-bytes-in"), QUERY_BYTES_OUT("x-query-bytes-out"), QUERY_TIME("x-query-time"), - READ_OPS("x-read-ops"), STORAGE_BYTES_READ("x-storage-bytes-read"), STORAGE_BYTES_WRITE("x-storage-bytes-write"), TXN_RETRIES("x-txn-retries"), TXN_TIME("x-txn-time"), - WRITE_OPS("x-write-ops"); private final String metric; diff --git a/faunadb-java/src/test/java/com/faunadb/client/ClientSpec.java b/faunadb-java/src/test/java/com/faunadb/client/ClientSpec.java index 9dcb26d1..db96e155 100644 --- a/faunadb-java/src/test/java/com/faunadb/client/ClientSpec.java +++ b/faunadb-java/src/test/java/com/faunadb/client/ClientSpec.java @@ -325,12 +325,10 @@ public void shouldReturnMetricsData() throws Exception { Optional queryBytesIn = metricsResponse.getMetric(MetricsResponse.Metrics.QUERY_BYTES_IN); Optional queryBytesOut = metricsResponse.getMetric(MetricsResponse.Metrics.QUERY_BYTES_OUT); Optional queryTime = metricsResponse.getMetric(MetricsResponse.Metrics.QUERY_TIME); - Optional readOps = metricsResponse.getMetric(MetricsResponse.Metrics.READ_OPS); Optional storageBytesRead = metricsResponse.getMetric(MetricsResponse.Metrics.STORAGE_BYTES_READ); Optional storageBytesWrite = metricsResponse.getMetric(MetricsResponse.Metrics.STORAGE_BYTES_WRITE); Optional txnRetries = metricsResponse.getMetric(MetricsResponse.Metrics.TXN_RETRIES); Optional txnTime = metricsResponse.getMetric(MetricsResponse.Metrics.TXN_TIME); - Optional writeOps = metricsResponse.getMetric(MetricsResponse.Metrics.WRITE_OPS); assertThat(byteReadOps.isPresent(), is(true)); assertThat(byteWriteOps.isPresent(), is(true)); @@ -3171,7 +3169,7 @@ public void streamFailsIfTargetDoesNotExist() throws Exception { @Test public void streamFailsIfQueryIsNotReadOnly() throws Exception { thrown.expectCause(isA(BadRequestException.class)); - thrown.expectMessage(containsString("invalid expression: Write effect in read-only query expression.")); + thrown.expectMessage(containsString("invalid expression: Call performs a write, which is not allowed in stream requests.")); adminClient.stream(CreateCollection(Collection("spells"))).get(); } diff --git a/faunadb-scala/src/test/scala/faunadb/ClientSpec.scala b/faunadb-scala/src/test/scala/faunadb/ClientSpec.scala index 1f125e2c..73c0d71e 100644 --- a/faunadb-scala/src/test/scala/faunadb/ClientSpec.scala +++ b/faunadb-scala/src/test/scala/faunadb/ClientSpec.scala @@ -2163,7 +2163,7 @@ class ClientSpec it should "stream return error if the query is not readonly" in { val err = client.stream(Create(Collection("spells"), Obj("data" -> Obj("testField" -> "testValue0")))).failed.futureValue err shouldBe a[BadRequestException] - err.getMessage should include("Write effect in read-only query expression.") + err.getMessage should include("Call performs a write, which is not allowed in stream requests.") } it should "stream on document reference contains `document` field by default" in {