Skip to content

Commit

Permalink
chore: convert cli tests to md (#2755)
Browse files Browse the repository at this point in the history
Co-authored-by: Tushar Mathur <[email protected]>
  • Loading branch information
ssddOnTop and tusharmath committed Aug 27, 2024
1 parent 452648e commit 6b51d4e
Show file tree
Hide file tree
Showing 5 changed files with 323 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```json @config
{
"inputs": [
{
Expand Down Expand Up @@ -63,3 +64,4 @@
"query": "Query"
}
}
```
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```json @config
{
"inputs": [
{
Expand All @@ -8,7 +9,7 @@
},
{
"proto": {
"src": "../../../../../../tailcall-fixtures/fixtures/protobuf/news.proto"
"src": "tailcall-fixtures/fixtures/protobuf/news.proto"
}
}
],
Expand All @@ -26,3 +27,4 @@
"query": "Query"
}
}
```
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
```json @config
{
"inputs": [
{
Expand Down Expand Up @@ -81,3 +82,4 @@
"query": "Query"
}
}
```
202 changes: 184 additions & 18 deletions tests/cli/gen.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,166 @@
mod parser;

pub mod cacache_manager {
use std::io::{Read, Write};
use std::path::PathBuf;

use flate2::write::GzEncoder;
use flate2::Compression;
use http_cache_reqwest::{CacheManager, HttpResponse};
use http_cache_semantics::CachePolicy;
use serde::{Deserialize, Serialize};

pub type BoxError = Box<dyn std::error::Error + Send + Sync>;
pub type Result<T> = std::result::Result<T, BoxError>;

pub struct CaCacheManager {
path: PathBuf,
}

#[derive(Clone, Deserialize, Serialize)]
pub struct Store {
response: HttpResponse,
policy: CachePolicy,
}

impl Default for CaCacheManager {
fn default() -> Self {
Self { path: PathBuf::from("./.cache") }
}
}

#[async_trait::async_trait]
impl CacheManager for CaCacheManager {
async fn put(
&self,
cache_key: String,
response: HttpResponse,
policy: CachePolicy,
) -> Result<HttpResponse> {
let data = Store { response: response.clone(), policy };
let bytes = bincode::serialize(&data)?;

let mut encoder = GzEncoder::new(Vec::new(), Compression::default());
encoder.write_all(&bytes)?;
let compressed_bytes = encoder.finish()?;

cacache::write(&self.path, cache_key, compressed_bytes).await?;
Ok(response)
}

async fn get(&self, cache_key: &str) -> Result<Option<(HttpResponse, CachePolicy)>> {
match cacache::read(&self.path, cache_key).await {
Ok(compressed_data) => {
let mut decoder = flate2::read::GzDecoder::new(compressed_data.as_slice());
let mut serialized_data = Vec::new();
decoder.read_to_end(&mut serialized_data)?;
let store: Store = bincode::deserialize(&serialized_data)?;
Ok(Some((store.response, store.policy)))
}
Err(_) => Ok(None),
}
}

async fn delete(&self, cache_key: &str) -> Result<()> {
Ok(cacache::remove(&self.path, cache_key).await?)
}
}
}

pub mod file {
use std::collections::HashMap;
use std::sync::Arc;

use async_trait::async_trait;
use tailcall::core::FileIO;
use tokio::sync::RwLock;

#[derive(Clone, Default)]
pub struct NativeFileTest(Arc<RwLock<HashMap<String, String>>>);
#[async_trait]
impl FileIO for NativeFileTest {
async fn write<'a>(&'a self, path: &'a str, content: &'a [u8]) -> anyhow::Result<()> {
self.0.write().await.insert(
path.to_string(),
String::from_utf8_lossy(content).to_string(),
);
Ok(())
}

async fn read<'a>(&'a self, path: &'a str) -> anyhow::Result<String> {
let val = if let Some(val) = self.0.read().await.get(path).cloned() {
val
} else {
std::fs::read_to_string(path)?
};
Ok(val)
}
}
}

pub mod http {
use anyhow::Result;
use http_cache_reqwest::{Cache, CacheMode, HttpCache, HttpCacheOptions};
use hyper::body::Bytes;
use reqwest::Client;
use reqwest_middleware::{ClientBuilder, ClientWithMiddleware};
use tailcall::core::http::Response;
use tailcall::core::HttpIO;

use super::cacache_manager::CaCacheManager;

#[derive(Clone)]
pub struct NativeHttpTest {
client: ClientWithMiddleware,
}

impl Default for NativeHttpTest {
fn default() -> Self {
let mut client = ClientBuilder::new(Client::new());
client = client.with(Cache(HttpCache {
mode: CacheMode::ForceCache,
manager: CaCacheManager::default(),
options: HttpCacheOptions::default(),
}));
Self { client: client.build() }
}
}

#[async_trait::async_trait]
impl HttpIO for NativeHttpTest {
#[allow(clippy::blocks_in_conditions)]
async fn execute(&self, request: reqwest::Request) -> Result<Response<Bytes>> {
let response = self.client.execute(request).await;
Ok(Response::from_reqwest(
response?
.error_for_status()
.map_err(|err| err.without_url())?,
)
.await?)
}
}
}
pub mod env {
use std::borrow::Cow;
use std::collections::HashMap;

use tailcall::core::EnvIO;

#[derive(Clone)]
pub struct Env(pub HashMap<String, String>);

impl EnvIO for Env {
fn get(&self, key: &str) -> Option<Cow<'_, str>> {
self.0.get(key).map(Cow::from)
}
}
}

pub mod test {
use std::path::Path;

use crate::parser::ExecutionSpec;

mod cacache_manager {
use std::io::{Read, Write};
use std::path::PathBuf;
Expand Down Expand Up @@ -120,25 +280,31 @@ pub mod test {
use tailcall::core::config::{self, ConfigModule};
use tailcall::core::generator::Generator as ConfigGenerator;
use tailcall::core::valid::{ValidateInto, Validator};
use tokio::runtime::Runtime;

use super::http::NativeHttpTest;
use crate::env::Env;
use crate::parser::{ExecutionSpec, IO};

pub fn run_config_generator_spec(path: &Path) -> datatest_stable::Result<()> {
let path = path.to_path_buf();
let runtime = Runtime::new().unwrap();
runtime.block_on(async move {
run_test(&path.to_string_lossy()).await?;
Ok(())
})
}
pub async fn run_test(original_path: &Path, spec: ExecutionSpec) -> anyhow::Result<()> {
let snapshot_name = original_path.to_string_lossy().to_string();

let IO { fs, paths } = spec.configs.into_io().await;
let path = paths.first().unwrap().as_str();

async fn run_test(path: &str) -> anyhow::Result<()> {
let mut runtime = tailcall::cli::runtime::init(&Blueprint::default());
runtime.http = Arc::new(NativeHttpTest::default());
runtime.file = Arc::new(fs);
if let Some(env) = spec.env {
runtime.env = Arc::new(Env(env))
}

let generator = Generator::new(path, runtime);
let config = generator.read().await?;
if spec.debug_assert_config {
insta::assert_debug_snapshot!(snapshot_name, config);
return Ok(());
}

let query_type = config.schema.query.clone().unwrap_or("Query".into());
let mutation_type_name = config.schema.mutation.clone();
let preset: config::transformer::Preset = config
Expand All @@ -164,11 +330,11 @@ pub mod test {

let config = ConfigModule::from(base_config);

insta::assert_snapshot!(path, config.to_sdl());
insta::assert_snapshot!(snapshot_name, config.to_sdl());
Ok(())
}
}
pub fn test_generator(path: &Path) -> datatest_stable::Result<()> {
async fn test_generator(path: &Path) -> datatest_stable::Result<()> {
if let Some(extension) = path.extension() {
if extension == "json"
&& path
Expand All @@ -177,15 +343,15 @@ pub mod test {
.map(|v| v.starts_with("gen"))
.unwrap_or_default()
{
let _ = generator_spec::run_config_generator_spec(path);
let spec = ExecutionSpec::from_source(path, std::fs::read_to_string(path)?)?;
generator_spec::run_test(path, spec).await?;
}
}
Ok(())
}
pub fn run(path: &Path) -> datatest_stable::Result<()> {
tokio_test::block_on(test_generator(path))
}
}

datatest_stable::harness!(
test::test_generator,
"tests/cli/fixtures/generator",
r"^.*\.json"
);
datatest_stable::harness!(test::run, "tests/cli/fixtures/generator", r"^.*\.md");
Loading

2 comments on commit 6b51d4e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

running 268 tests
test run_execution_spec::add-field-index-list.md ... ok
test run_execution_spec::add-field-many.md ... ok
test run_execution_spec::add-field-many-list.md ... ok
test run_execution_spec::add-field-modify.md ... ok
test run_execution_spec::add-field-with-modify.md ... ok
test run_execution_spec::add-field-with-composition.md ... ok
test run_execution_spec::add-field.md ... ok
test run_execution_spec::apollo-tracing.md ... ok
test run_execution_spec::async-cache-disabled.md ... ok
test run_execution_spec::async-cache-enable-multiple-resolvers.md ... ok
test run_execution_spec::async-cache-global.md ... ok
test run_execution_spec::async-cache-inflight-request.md ... ok
test run_execution_spec::async-cache-enabled.md ... ok
test run_execution_spec::auth-protected-without-auth.md ... ok
test run_execution_spec::auth-jwt.md ... ok
test run_execution_spec::auth-basic.md ... ok
test run_execution_spec::batching-disabled.md ... ok
test run_execution_spec::auth.md ... ok
test run_execution_spec::batching-default.md ... ok
test run_execution_spec::batching-group-by-optional-key.md ... ok
test run_execution_spec::batching-group-by-default.md ... ok
test run_execution_spec::batching-group-by.md ... ok
test run_execution_spec::batching-post.md ... ok
test run_execution_spec::batching.md ... ok
test run_execution_spec::cache-control.md ... ok
test run_execution_spec::caching.md ... ok
test run_execution_spec::caching-collision.md ... ok
test run_execution_spec::call-graphql-datasource.md ... ok
test run_execution_spec::call-multiple-steps-piping.md ... ok
test run_execution_spec::call-mutation.md ... ok
test run_execution_spec::call-operator.md ... ok
test run_execution_spec::cors-allow-cred-false.md ... ok
test run_execution_spec::cors-invalid-expose-headers.md ... ok
test run_execution_spec::cors-invalid-headers.md ... ok
test run_execution_spec::cors-invalid-methods.md ... ok
test run_execution_spec::cors-invalid-origins.md ... ok
test run_execution_spec::cors-allow-cred-true.md ... ok
test run_execution_spec::cors-allow-cred-vary.md ... ok
test run_execution_spec::custom-headers.md ... ok
test run_execution_spec::dedupe_batch_query_execution.md ... ok
test run_execution_spec::default-value-arg.md ... ok
test run_execution_spec::experimental-headers-error.md ... ok
test run_execution_spec::default-value-config.md ... ok
test run_execution_spec::experimental-headers.md ... ok
test run_execution_spec::graphql-conformance-002.md ... ok
test run_execution_spec::env-value.md ... ok
test run_execution_spec::graphql-conformance-004.md ... ok
test run_execution_spec::graphql-conformance-005.md ... ok
test run_execution_spec::graphql-conformance-006.md ... ok
test run_execution_spec::graphql-conformance-007.md ... ok
test run_execution_spec::graphql-conformance-008.md ... ok
test run_execution_spec::graphql-conformance-009.md ... ok
test run_execution_spec::graphql-conformance-001.md ... ok
test run_execution_spec::graphql-conformance-011.md ... ok
test run_execution_spec::graphql-conformance-012.md ... ok
test run_execution_spec::graphql-conformance-010.md ... ok
test run_execution_spec::graphql-conformance-003.md ... ok
test run_execution_spec::graphql-conformance-014.md ... ok
test run_execution_spec::graphql-conformance-016.md ... ok
test run_execution_spec::graphql-conformance-017.md ... ok
test run_execution_spec::graphql-conformance-015.md ... ok
test run_execution_spec::graphql-conformance-013.md ... FAILED
test run_execution_spec::graphql-conformance-http-002.md ... ok
test run_execution_spec::graphql-conformance-http-001.md ... ok
test run_execution_spec::graphql-conformance-http-003.md ... ok
test run_execution_spec::graphql-conformance-http-005.md ... ok
test run_execution_spec::graphql-conformance-http-004.md ... ok
test run_execution_spec::graphql-conformance-http-007.md ... ok
test run_execution_spec::graphql-conformance-http-009.md ... ok
test run_execution_spec::graphql-conformance-http-008.md ... ok
test run_execution_spec::graphql-conformance-http-011.md ... ok
test run_execution_spec::graphql-conformance-http-006.md ... ok
test run_execution_spec::graphql-conformance-http-012.md ... ok
test run_execution_spec::graphql-conformance-http-010.md ... ok
test run_execution_spec::graphql-conformance-http-013.md ... FAILED
test run_execution_spec::graphql-conformance-http-016.md ... ok
test run_execution_spec::graphql-conformance-http-017.md ... ok
test run_execution_spec::graphql-conformance-http-014.md ... ok
test run_execution_spec::graphql-conformance-http-015.md ... ok
test run_execution_spec::graphql-dataloader-batch-request.md ... ok
test run_execution_spec::graphql-dataloader-no-batch-request.md ... ok
test run_execution_spec::graphql-datasource-errors.md ... ok
test run_execution_spec::graphql-datasource-mutation.md ... ok
test run_execution_spec::graphql-datasource-no-args.md ... ok
test run_execution_spec::graphql-datasource-query-directives.md ... ok
test run_execution_spec::graphql-datasource-with-args.md ... ok
test run_execution_spec::graphql-datasource-with-empty-enum.md ... ok
test run_execution_spec::graphql-datasource-with-mandatory-enum.md ... ok
test run_execution_spec::graphql-nested-datasource.md ... ok
test run_execution_spec::grpc-batch.md ... ok
test run_execution_spec::grpc-error.md ... ok
test run_execution_spec::grpc-json.md ... ok
test run_execution_spec::grpc-map.md ... ok
test run_execution_spec::grpc-oneof.md ... FAILED
test run_execution_spec::grpc-override-url-from-upstream.md ... ok
test run_execution_spec::grpc-proto-with-same-package.md ... ok
test run_execution_spec::grpc-reflection.md ... ok
test run_execution_spec::grpc-simple.md ... ok
test run_execution_spec::https.md ... ok
test run_execution_spec::grpc-url-from-upstream.md ... ok
test run_execution_spec::inline-field.md ... ok
test run_execution_spec::inline-index-list.md ... ok
test run_execution_spec::input-type-protected-error.md ... ok
test run_execution_spec::io-cache.md ... ok
test run_execution_spec::inline-many-list.md ... ok
test run_execution_spec::inline-many.md ... ok
test run_execution_spec::js-directive.md ... ok
test run_execution_spec::modified-field.md ... ok
test run_execution_spec::mutation-put.md ... ok
test run_execution_spec::jsonplaceholder-call-post.md ... ok
test run_execution_spec::mutation.md ... ok
test run_execution_spec::n-plus-one-list.md ... ok
test run_execution_spec::n-plus-one.md ... ok
test run_execution_spec::nested-objects.md ... ok
test run_execution_spec::nesting-level3.md ... ok
test run_execution_spec::nested-recursive-types.md ... ok
test run_execution_spec::nullable-arg-query.md ... ok
test run_execution_spec::omit-index-list.md ... ok
test run_execution_spec::predefined-scalar.md ... ok
test run_execution_spec::recursive-types-json.md ... ok
test run_execution_spec::recursive-types-no-resolver.md ... ok
test run_execution_spec::omit-resolved-by-parent.md ... ok
test run_execution_spec::omit-many.md ... ok
test run_execution_spec::ref-other-nested.md ... ok
test run_execution_spec::ref-other.md ... ok
test run_execution_spec::recursive-types.md ... ok
test run_execution_spec::related-fields-recursive.md ... ok
test run_execution_spec::request-to-upstream-batching.md ... ok
test run_execution_spec::rename-field.md ... ok
test run_execution_spec::resolve-with-vars.md ... ok
test run_execution_spec::resolve-with-headers.md ... ok
test run_execution_spec::resolved-by-parent.md ... ok
test run_execution_spec::rest-api-error.md ... ok
test run_execution_spec::rest-api-post.md ... ok
test run_execution_spec::rest-api.md ... ok
test run_execution_spec::showcase.md ... ok
test run_execution_spec::simple-graphql.md ... ok
test run_execution_spec::test-add-field-error.md ... ok
test run_execution_spec::simple-query.md ... ok
test run_execution_spec::test-add-field-list.md ... ok
test run_execution_spec::test-all-blueprint-errors.md ... ok
test run_execution_spec::test-batch-operator-post.md ... ok
test run_execution_spec::test-add-field.md ... ok
test run_execution_spec::test-add-link-to-empty-config.md ... ok
test run_execution_spec::test-call-operator-errors.md ... ok
test run_execution_spec::test-conflict-allowed-headers.md ... ok
test run_execution_spec::test-conflict-vars.md ... ok
test run_execution_spec::test-cache.md ... ok
test run_execution_spec::test-batching-group-by.md ... ok
test run_execution_spec::test-dbl-usage-many.md ... ok
test run_execution_spec::test-custom-scalar.md ... ok
test run_execution_spec::test-directives-undef-null-fields.md ... ok
test run_execution_spec::test-duplicated-link.md ... ok
test run_execution_spec::test-empty-link.md ... ok
test run_execution_spec::test-custom-types.md ... ok
test run_execution_spec::test-enable-jit.md ... ok
test run_execution_spec::test-description-many.md ... ok
test run_execution_spec::test-enum-default.md ... ok
test run_execution_spec::test-enum-empty.md ... ok
test run_execution_spec::test-enum-aliases.md ... ok
test run_execution_spec::test-enum-merge.md ... ok
test run_execution_spec::test-expr-error.md ... ok
test run_execution_spec::test-expr-scalar-as-string.md ... ok
test run_execution_spec::test-enum-description.md ... ok
test run_execution_spec::test-expr-with-add-field.md ... ok
test run_execution_spec::test-expr-with-inline.md ... ok
test run_execution_spec::test-enum.md ... ok
test run_execution_spec::test-field-already-implemented-from-Interface.md ... ok
test run_execution_spec::test-graphql-with-add-field.md ... ok
test run_execution_spec::test-graphqlsource-no-base-url.md ... ok
test run_execution_spec::test-expr-with-mustache.md ... ok
test run_execution_spec::test-groupby-without-batching.md ... ok
test run_execution_spec::test-grpc-group-by.md ... ok
test run_execution_spec::test-grpc-invalid-method-format.md ... ok
test run_execution_spec::test-grpc-invalid-proto-id.md ... ok
test run_execution_spec::test-grpc-missing-fields.md ... ok
test run_execution_spec::test-grpc-nested-data.md ... ok
test run_execution_spec::test-grpc-nested-optional.md ... ok
test run_execution_spec::test-grpc-optional.md ... ok
test run_execution_spec::test-grpc-proto-path.md ... ok
test run_execution_spec::test-grpc-service-method.md ... ok
test run_execution_spec::test-grpc-service.md ... ok
test run_execution_spec::test-expr.md ... ok
test run_execution_spec::test-hostname-faliure.md ... ok
test run_execution_spec::test-graphqlsource.md ... ok
test run_execution_spec::test-grpc.md ... ok
test run_execution_spec::test-http-baseurl.md ... ok
test run_execution_spec::test-http-batchKey.md ... ok
test run_execution_spec::test-http-with-add-field.md ... ok
test run_execution_spec::test-http-with-inline.md ... ok
test run_execution_spec::test-http-headers.md ... ok
test run_execution_spec::test-http-with-mustache-expr.md ... ok
test run_execution_spec::test-inline-error.md ... ok
test run_execution_spec::test-http-tmpl.md ... ok
test run_execution_spec::test-http.md ... ok
test run_execution_spec::test-inline-list.md ... ok
test run_execution_spec::test-inline.md ... ok
test run_execution_spec::test-input-out.md ... ok
test run_execution_spec::test-input-with-arg-out.md ... ok
test run_execution_spec::test-input-documentation.md ... ok
test run_execution_spec::test-interface-from-json.md ... ok
test run_execution_spec::test-invalid-query-in-http.md ... ok
test run_execution_spec::test-invalid-server.md ... ok
test run_execution_spec::test-js-multi-onRequest-handlers.md ... ok
test run_execution_spec::test-js-multiple-scripts.md ... ok
test run_execution_spec::test-interface.md ... ok
test run_execution_spec::test-interface-result.md ... ok
test run_execution_spec::test-lack-resolver.md ... ok
test run_execution_spec::test-js-request-response-2.md ... ok
test run_execution_spec::test-js-request-response.md ... ok
test run_execution_spec::test-list-args.md ... ok
test run_execution_spec::test-merge-batch.md ... ok
test run_execution_spec::test-merge-query.md ... ok
test run_execution_spec::test-merge-nested.md ... ok
test run_execution_spec::test-merge-union.md ... ok
test run_execution_spec::test-missing-argument-on-all-resolvers.md ... ok
test run_execution_spec::test-missing-mutation-resolver.md ... ok
test run_execution_spec::test-missing-query-resolver.md ... ok
test run_execution_spec::test-missing-root-types.md ... ok
test run_execution_spec::test-missing-schema-query.md ... ok
test run_execution_spec::test-merge-right-with-link-config.md ... ok
test run_execution_spec::test-merge-server-sdl.md ... ok
test run_execution_spec::test-multiple-config-types.md ... ok
test run_execution_spec::test-multiple-resolvable-directives-on-field.md ... ok
test run_execution_spec::test-modify.md ... ok
test run_execution_spec::test-multi-interface.md ... ok
test run_execution_spec::test-nested-input.md ... ok
test run_execution_spec::test-no-base-url.md ... ok
test run_execution_spec::test-nested-value.md ... ok
test run_execution_spec::test-nested-link.md ... ok
test run_execution_spec::test-null-in-array.md ... ok
test run_execution_spec::test-null-in-object.md ... ok
test run_execution_spec::test-omit-list.md ... ok
test run_execution_spec::test-optional-key-skip-empty.md ... ok
test run_execution_spec::test-omit.md ... ok
test run_execution_spec::test-params-as-body.md ... ok
test run_execution_spec::test-query-documentation.md ... ok
test run_execution_spec::test-response-header-merge.md ... ok
test run_execution_spec::test-response-header-value.md ... ok
test run_execution_spec::test-response-headers-multi.md ... ok
test run_execution_spec::test-query.md ... ok
test run_execution_spec::test-response-headers-name.md ... ok
test run_execution_spec::test-ref-other.md ... ok
test run_execution_spec::test-scalars-builtin.md ... ok
test run_execution_spec::test-scalars-integers.md ... ok
test run_execution_spec::test-scalars-validation.md ... ok
test run_execution_spec::test-server-base-types.md ... ok
test run_execution_spec::test-set-cookie-headers.md ... ok
test run_execution_spec::test-server-vars.md ... ok
test run_execution_spec::test-undefined-query.md ... ok
test run_execution_spec::test-static-value.md ... ok
test run_execution_spec::test-union-many-types.md ... ok
test run_execution_spec::test-union-same-types.md ... ok
test run_execution_spec::test-union-ambiguous.md ... ok
test run_execution_spec::test-scalars.md ... ok
test run_execution_spec::test-upstream-headers.md ... ok
test run_execution_spec::undeclared-type-no-base-url.md ... ok
test run_execution_spec::undeclared-type.md ... ok
test run_execution_spec::test-union.md ... FAILED
test run_execution_spec::test-upstream.md ... ok
test run_execution_spec::upstream-batching.md ... ok
test run_execution_spec::upstream-fail-request.md ... ok
test run_execution_spec::with-args-url.md ... ok
test run_execution_spec::with-args.md ... ok
test run_execution_spec::with-nesting.md ... ok
test run_execution_spec::yaml-nested-unions.md ... ok
test run_execution_spec::yaml-union-in-type.md ... ok
test run_execution_spec::yaml-union.md ... ok

failures:

---- run_execution_spec::graphql-conformance-013.md ----
test panicked: snapshot assertion for 'graphql-conformance-013.md_0' failed in line 202

---- run_execution_spec::graphql-conformance-http-013.md ----
test panicked: snapshot assertion for 'graphql-conformance-http-013.md_0' failed in line 202

---- run_execution_spec::grpc-oneof.md ----
test panicked: snapshot assertion for 'grpc-oneof.md_0' failed in line 202

---- run_execution_spec::test-union.md ----
test panicked: snapshot assertion for 'test-union.md_4' failed in line 202

failures:
run_execution_spec::graphql-conformance-013.md
run_execution_spec::graphql-conformance-http-013.md
run_execution_spec::grpc-oneof.md
run_execution_spec::test-union.md

test result: FAILED. 264 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in 18.33s

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running 30s test @ http://localhost:8000/graphql

4 threads and 100 connections

Thread Stats Avg Stdev Max +/- Stdev
Latency 6.83ms 3.23ms 117.92ms 73.71%
Req/Sec 3.71k 138.08 4.76k 87.17%

442663 requests in 30.02s, 2.22GB read

Requests/sec: 14748.02

Transfer/sec: 75.70MB

Please sign in to comment.