lwjgl test: fix build exceed timeout
This commit is contained in:
parent
3d82f5c459
commit
961bf92734
@ -30,6 +30,7 @@
|
|||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
package com.jme3.app;
|
package com.jme3.app;
|
||||||
|
|
||||||
import com.jme3.renderer.RenderManager;
|
import com.jme3.renderer.RenderManager;
|
||||||
import com.jme3.system.JmeContext;
|
import com.jme3.system.JmeContext;
|
||||||
import java.awt.GraphicsEnvironment;
|
import java.awt.GraphicsEnvironment;
|
||||||
@ -69,15 +70,19 @@ public class LwjglAppTest {
|
|||||||
app.setLostFocusBehavior(LostFocusBehavior.Disabled);
|
app.setLostFocusBehavior(LostFocusBehavior.Disabled);
|
||||||
|
|
||||||
// start the application - simple init / update will be called once.
|
// start the application - simple init / update will be called once.
|
||||||
app.start(type, true); assert app.isStarted();
|
app.start(type, true);
|
||||||
|
assert app.isStarted();
|
||||||
|
|
||||||
// stop the application, wait a bit, then start it again.
|
// stop the application, wait a bit, then start it again.
|
||||||
app.stop(true); assert !app.isStarted();
|
app.stop(true);
|
||||||
|
assert !app.isStarted();
|
||||||
|
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
|
|
||||||
app.start(type, true); assert app.isStarted();
|
app.start(type, true);
|
||||||
app.stop(true); assert !app.isStarted();
|
assert app.isStarted();
|
||||||
|
app.stop(true);
|
||||||
|
assert !app.isStarted();
|
||||||
|
|
||||||
// make sure each method was called twice.
|
// make sure each method was called twice.
|
||||||
assertEquals(2, simpleInitAppInvocations.get());
|
assertEquals(2, simpleInitAppInvocations.get());
|
||||||
@ -98,6 +103,7 @@ public class LwjglAppTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testOffscreenSurface() throws InterruptedException {
|
public void testOffscreenSurface() throws InterruptedException {
|
||||||
|
assumeFalse(GraphicsEnvironment.isHeadless());
|
||||||
doStopStart(new TestApp(), JmeContext.Type.OffscreenSurface);
|
doStopStart(new TestApp(), JmeContext.Type.OffscreenSurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user