Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Service/Tests/FunctionalTests/EDOServiceUIBlockTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#import "Service/Tests/FunctionalTests/EDOServiceUIBaseTest.h"

#include <pthread.h>

#import "Service/Sources/EDOClientService.h"
#import "Service/Sources/EDOHostService.h"
#import "Service/Sources/NSObject+EDOValueObject.h"
Expand Down Expand Up @@ -154,6 +156,7 @@ - (void)testBlockResolveToLocalAddress {

// Sending block to remote process through background eDO host.
dispatch_sync(backgroundQueue, ^{
pthread_set_qos_class_self_np(QOS_CLASS_DEFAULT, 0);
remoteDummy.block = localBlock;
});

Expand Down
10 changes: 8 additions & 2 deletions Service/Tests/FunctionalTests/EDOServiceUITest.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#import "Service/Tests/FunctionalTests/EDOServiceUIBaseTest.h"

#include <objc/runtime.h>
#include <pthread.h>

#import <CoreImage/CoreImage.h>

Expand Down Expand Up @@ -223,7 +224,10 @@ - (void)testMultiplexInvocationStressfully {
- (void)testTemporaryServiceHandlesRecursiveCall {
[self launchApplicationWithPort:EDOTEST_APP_SERVICE_PORT initValue:5];
EDOTestDummy *remoteDummy = [EDOClientService rootObjectWithPort:EDOTEST_APP_SERVICE_PORT];
dispatch_queue_t testQueue = dispatch_queue_create("com.google.edotest", DISPATCH_QUEUE_SERIAL);
// Align QoS with eDO internal threads to avoid priority inversion.
dispatch_queue_attr_t attr =
dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL, QOS_CLASS_DEFAULT, 0);
dispatch_queue_t testQueue = dispatch_queue_create("com.google.edotest", attr);

XCTestExpectation *expectation = [self expectationWithDescription:@"recursive call completes."];
__block NSUInteger recursiveLayer = 5;
Expand Down Expand Up @@ -273,8 +277,10 @@ - (void)testDispatchAsyncEarlyReturn {

- (void)testDispatchAsyncManyTimes {
[self launchApplicationWithPort:EDOTEST_APP_SERVICE_PORT initValue:8];
dispatch_queue_attr_t attr =
dispatch_queue_attr_make_with_qos_class(DISPATCH_QUEUE_SERIAL, QOS_CLASS_DEFAULT, 0);
NS_VALID_UNTIL_END_OF_SCOPE dispatch_queue_t backgroundQueue =
dispatch_queue_create("com.google.edo.uitest", DISPATCH_QUEUE_SERIAL);
dispatch_queue_create("com.google.edo.uitest", attr);
EDOTestDummyInTest *rootDummy = [[EDOTestDummyInTest alloc] initWithValue:9];
EDOHostService *service = [EDOHostService serviceWithPort:2234
rootObject:rootDummy
Expand Down