Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(739)

Unified Diff: runtime/vm/thread_test.cc

Issue 2567153002: Updated SimpleManyTasksWithZones test to not use PrintJSONForVM (Closed)
Patch Set: Fixed test to not use PrintJSONForVM to get isolate information since it only returns @Isolates. Al… Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread_test.cc
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index 9651dff66c8bd04b75b34172c9129b3e82848c34..e0fd8f9361997d5b0ad9299f12b09987f9124bce 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -313,17 +313,16 @@ TEST_CASE(ManySimpleTasksWithZones) {
done_count = 0;
}
+ // Get the information for the current isolate.
+ // We only need to check the current isolate since all tasks are spawned
+ // inside this single isolate.
JSONStream stream;
- Service::PrintJSONForVM(&stream, false);
+ isolate->PrintJSON(&stream, false);
const char* json = stream.ToCString();
// Confirm all expected entries are in the JSON output.
for (intptr_t i = 0; i < kTaskCount + 1; i++) {
Thread* thread = threads[i];
- Isolate* thread_isolate = thread->isolate();
- // Buffer can handle any possible input length given types.
- // char thread_address_buf[96];
- // char isolate_address_buf[64];
Zone* top_zone = thread->zone();
Thread* current_thread = Thread::Current();
@@ -350,17 +349,7 @@ TEST_CASE(ManySimpleTasksWithZones) {
"\"id\":\"threads\\/%" Pd "",
OSThread::ThreadIdToIntPtr(thread->os_thread()->trace_id()));
- // Ensure the isolate for each thread is valid.
-
- char* isolate_info_buf =
- OS::SCreate(current_zone,
- "\"type\":\"Isolate\","
- "\"fixedId\":true,"
- "\"id\":\"isolates\\/%" Pd64 "",
- static_cast<int64_t>(thread_isolate->main_port()));
-
EXPECT_SUBSTRING(thread_info_buf, json);
- EXPECT_SUBSTRING(isolate_info_buf, json);
}
// Unblock the tasks so they can finish.
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698