VirtualBox

Changeset 56636 in vbox


Ignore:
Timestamp:
Jun 25, 2015 11:31:10 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
101270
Message:

Main/glue/tests: add some comments to the java sample code, and clean up the code using the NAT engine (not part of the SDK)

Location:
trunk/src/VBox/Main/glue/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/tests/TestVBox.java

    r56625 r56636  
    7373                    es.eventProcessed(listener, ev);
    7474                }
     75                // process system event queue
    7576                mgr.waitForEvents(0);
    7677            }
     
    116117            }
    117118        }
     119        // process system event queue
    118120        mgr.waitForEvents(0);
    119121    }
     
    124126        while (!p.getCompleted())
    125127        {
     128            // process system event queue
    126129            mgr.waitForEvents(0);
     130            // wait for completion of the task, but at most 200 msecs
    127131            p.waitForCompletion(200);
    128132            if (System.currentTimeMillis() >= end)
     
    142146        progressBar(mgr, p, 10000);
    143147        session.unlockMachine();
     148        // process system event queue
    144149        mgr.waitForEvents(0);
    145150    }
     
    166171            session1.unlockMachine();
    167172            session2.unlockMachine();
     173            // process system event queue
    168174            mgr1.waitForEvents(0);
    169175            mgr2.waitForEvents(0);
     
    188194            off += buf.length;
    189195        }
     196        // process system event queue
    190197        mgr.waitForEvents(0);
    191198    }
     
    271278        }
    272279
     280        // process system event queue
    273281        mgr.waitForEvents(0);
    274282        if (ws)
  • trunk/src/VBox/Main/glue/tests/TestVBoxNATEngine.java

    r45186 r56636  
    55
    66/*
    7  * Copyright (C) 2013 Oracle Corporation
     7 * Copyright (C) 2013-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1515 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
    1616 */
    17 import org.virtualbox_4_3.*;
     17import org.virtualbox_5_0.*;
    1818import java.util.List;
    1919import java.util.Arrays;
     
    8585            inaccessible = true;
    8686        }           
     87
     88        // process system event queue
     89        mgr.waitForEvents(0);
    8790    }
    8891
     
    9194        System.out.println("\nAttempting to start VM '" + vm.getName() + "'");
    9295        mgr.startVm(vm.getName(), null, 7000);
     96        // process system event queue
     97        mgr.waitForEvents(0);
    9398    }
    9499
     
    152157                        testEnumeration(mgr, vbox, vm);
    153158                        testStart(mgr, vbox, vm);
    154                         //testEvents(mgr, vbox.getEventSource());
    155159                    }
    156160                    System.out.println("done, press Enter...");
     
    167171                e.printStackTrace();
    168172            }
     173
     174        // process system event queue
     175        mgr.waitForEvents(0);
    169176
    170177        if (ws)
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette