From 57eede97d8b6a98f6e1d5479803bdebfeb0391b0 Mon Sep 17 00:00:00 2001 From: Mark Erickson Date: Tue, 1 Mar 2016 15:14:40 -0600 Subject: [PATCH] I looked at Go-Dart locally, and the response body from the Go server appears to be empty. Go server - Java client also fails for me for http. So without much more time to investigate, I think the best course of action is to add these to known_failures_Linux.json to allow CI to pass. There are already other combinations excluded for those server - transport pairs. go-dart compact http-ip failure(13) hs-dart compact framed-ip failure(13) cpp-dart compact http-ip failure(13) THRIFT-3702 --- test/dart/test_client/bin/main.dart | 12 +++++++----- test/dart/test_client/pubspec.yaml | 1 + test/known_failures_Linux.json | 5 ++++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/test/dart/test_client/bin/main.dart b/test/dart/test_client/bin/main.dart index 2f5bb70d0b9..78a4f79eeb4 100644 --- a/test/dart/test_client/bin/main.dart +++ b/test/dart/test_client/bin/main.dart @@ -20,7 +20,8 @@ import 'dart:convert'; import 'dart:io'; import 'package:args/args.dart'; -import 'package:collection/equality.dart'; +import 'package:collection/collection.dart'; +import 'package:http/http.dart' as http; import 'package:thrift/thrift.dart'; import 'package:thrift/thrift_console.dart'; import 'package:thrift_test/thrift_test.dart'; @@ -151,8 +152,9 @@ Future _initTestClient( var protocolFactory = getProtocolFactory(protocolType); if (transportType == 'http') { - var httpClient = new HttpClient(); - var config = new THttpConfig(Uri.parse('http://localhost'), {}); + var httpClient = new http.IOClient(); + var uri = Uri.parse('http://$host:$port'); + var config = new THttpConfig(uri, {}); transport = new THttpClientTransport(httpClient, config); } else { var socket = await Socket.connect(host, port); @@ -309,7 +311,7 @@ List _createTests() { tests.add(new TTest(TEST_EXCEPTIONS, 'testException', () async { try { await client.testException('Xception'); - } on Xception catch (x) { + } on Xception catch (_) { return; } @@ -319,7 +321,7 @@ List _createTests() { tests.add(new TTest(TEST_EXCEPTIONS, 'testMultiException', () async { try { await client.testMultiException('Xception2', 'foo'); - } on Xception2 catch (x) { + } on Xception2 catch (_) { return; } diff --git a/test/dart/test_client/pubspec.yaml b/test/dart/test_client/pubspec.yaml index b76fb5d2ddf..493ee328e34 100644 --- a/test/dart/test_client/pubspec.yaml +++ b/test/dart/test_client/pubspec.yaml @@ -24,6 +24,7 @@ environment: sdk: ^1.12.0 dependencies: args: ^0.13.0 + http: ^0.11.0 thrift: path: ../../../lib/dart thrift_test: diff --git a/test/known_failures_Linux.json b/test/known_failures_Linux.json index a27b27a3f3d..7b51d1f7292 100644 --- a/test/known_failures_Linux.json +++ b/test/known_failures_Linux.json @@ -19,6 +19,7 @@ "cpp-cpp_json_http-ip", "cpp-cpp_json_http-ip-ssl", "cpp-dart_binary_http-ip", + "cpp-dart_compact_http-ip", "cpp-dart_json_http-ip", "cpp-go_binary_http-ip", "cpp-go_binary_http-ip-ssl", @@ -101,8 +102,8 @@ "go-cpp_json_http-ip-ssl", "go-dart_binary_framed-ip", "go-dart_binary_http-ip", + "go-dart_compact_http-ip", "go-dart_json_framed-ip", - "go-nodejs_json_framed-ip", "go-dart_json_http-ip", "go-java_binary_http-ip", "go-java_binary_http-ip-ssl", @@ -110,12 +111,14 @@ "go-java_compact_http-ip-ssl", "go-java_json_http-ip", "go-java_json_http-ip-ssl", + "go-nodejs_json_framed-ip", "go-perl_binary_buffered-ip-ssl", "go-perl_binary_framed-ip-ssl", "hs-csharp_binary_framed-ip", "hs-csharp_compact_framed-ip", "hs-csharp_json_framed-ip", "hs-dart_binary_framed-ip", + "hs-dart_compact_framed-ip", "hs-dart_json_framed-ip", "hs-py3_json_buffered-ip", "hs-py3_json_framed-ip",