mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-06 18:35:19 +00:00
THRIFT-3702 Fix cross tests for Dart compact protocol (3 failing)
Client: Dart Patch: Mark Erickson This closes #917
This commit is contained in:
parent
b5f126f6d6
commit
56c1c645f2
@ -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<TTest> _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<TTest> _createTests() {
|
||||
tests.add(new TTest(TEST_EXCEPTIONS, 'testMultiException', () async {
|
||||
try {
|
||||
await client.testMultiException('Xception2', 'foo');
|
||||
} on Xception2 catch (x) {
|
||||
} on Xception2 catch (_) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ environment:
|
||||
sdk: ^1.12.0
|
||||
dependencies:
|
||||
args: ^0.13.0
|
||||
http: ^0.11.0
|
||||
thrift:
|
||||
path: ../../../lib/dart
|
||||
thrift_test:
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user