Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Unit Testing

Unit Testing

Scheduled Pinned Locked Moved C#
testingdata-structuresbeta-testinghelpquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mark_w_
    wrote on last edited by
    #1

    I have a number of test that each submit an object to a Queue (that is declared statically in my Unit test Class) The queue automatically processes each item until there is non left and then fires an event allProcessed. The problem, is that for each unit test all i test is that it was added to the queue correctally, and i need to let the queue finish processing and at the moment it is getting cut off becasue all the tests finish before the queue processed. Is there any way to make the test run wait until the allProcessed is fired? Thanks

    M 1 Reply Last reply
    0
    • M mark_w_

      I have a number of test that each submit an object to a Queue (that is declared statically in my Unit test Class) The queue automatically processes each item until there is non left and then fires an event allProcessed. The problem, is that for each unit test all i test is that it was added to the queue correctally, and i need to let the queue finish processing and at the moment it is getting cut off becasue all the tests finish before the queue processed. Is there any way to make the test run wait until the allProcessed is fired? Thanks

      M Offline
      M Offline
      mark_w_
      wrote on last edited by
      #2

      Just checked in public static void MyClassCleanup() { if(QueueLength!=0) { Thread.Sleep(1000); } }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups