Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 231506 Details for
Bug 301330
OSX Cocoa - Things get slower over time when running long sequence of tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
UI test program that shows the leak
IEditorPartLoopTest.java (text/plain), 1.83 KB, created by
Francis Upton IV
on 2013-05-24 18:07:29 EDT
(
hide
)
Description:
UI test program that shows the leak
Filename:
MIME Type:
Creator:
Francis Upton IV
Created:
2013-05-24 18:07:29 EDT
Size:
1.83 KB
patch
obsolete
>/******************************************************************************* > * Copyright (c) 2000, 2006 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html > * > * Contributors: > * IBM Corporation - initial API and implementation > *******************************************************************************/ >package org.eclipse.ui.tests.api; > >import org.eclipse.core.resources.IFile; >import org.eclipse.core.resources.IProject; >import org.eclipse.swt.widgets.Display; >import org.eclipse.ui.IWorkbenchPage; >import org.eclipse.ui.IWorkbenchWindow; >import org.eclipse.ui.part.FileEditorInput; >import org.eclipse.ui.tests.harness.util.FileUtil; >import org.eclipse.ui.tests.harness.util.UITestCase; > >public class IEditorPartLoopTest extends UITestCase { > > protected IWorkbenchWindow fWindow; > > protected IWorkbenchPage fPage; > > public IEditorPartLoopTest(String testName) { > super(testName); > } > > protected void doSetUp() throws Exception { > super.doSetUp(); > fWindow = openTestWindow(); > fPage = fWindow.getActivePage(); > } > > public void testOpenAndCloseLoop() throws Throwable { > Thread.sleep(10000); > for (int i = 0; i < 1000000; i++) { > System.out.println("Editor open: " + i); > IProject proj = FileUtil.createProject("IEditorPartLoopTest"); > IFile file = FileUtil.createFile("IEditorPartTest.txt", proj); > MockEditorPart part = (MockEditorPart) fPage.openEditor( > new FileEditorInput(file), MockEditorPart.ID1); > part.setDirty(true); > part.setSaveNeeded(false); > fPage.closeEditor(part, true); > Display.getCurrent().readAndDispatch(); > System.out.println("Editor close: " + i); > } > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 301330
:
157688
|
157689
|
157935
|
231185
| 231506