gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r21941 - gnunet-java/test/org/gnunet/statistics


From: gnunet
Subject: [GNUnet-SVN] r21941 - gnunet-java/test/org/gnunet/statistics
Date: Wed, 13 Jun 2012 03:00:59 +0200

Author: dold
Date: 2012-06-13 03:00:59 +0200 (Wed, 13 Jun 2012)
New Revision: 21941

Modified:
   gnunet-java/test/org/gnunet/statistics/StatisticsTest.java
Log:
test

Modified: gnunet-java/test/org/gnunet/statistics/StatisticsTest.java
===================================================================
--- gnunet-java/test/org/gnunet/statistics/StatisticsTest.java  2012-06-13 
00:57:28 UTC (rev 21940)
+++ gnunet-java/test/org/gnunet/statistics/StatisticsTest.java  2012-06-13 
01:00:59 UTC (rev 21941)
@@ -113,39 +113,39 @@
         stat1.update("gnj-test", "test3", 5, true);
         stat1.update("gnj-test", "test3", -1, true);
 
+        Scheduler.addDelayed(new RelativeTime(200), new Scheduler.Task() {
+            @Override
+            public void run(Scheduler.RunContext ctx) {
 
-        try {
-            // wait for the values to be set
-            Thread.sleep(200);
-        } catch (InterruptedException e) {
-            Assert.fail();
-        }
+                stat1.destroy();
 
-        stat1.destroy();
+                System.out.println("starting get tests");
 
-        System.out.println("starting get tests");
+                final Statistics stat2 = new Statistics(ts.getConfiguration());
 
-        final Statistics stat2 = new Statistics(ts.getConfiguration());
-
-        assertStatisticsGet(assertions, stat2, "gnj-test", "test1", 5, new 
Next() {
-            @Override
-            public void next() {
-                assertStatisticsGet(assertions, stat2, "gnj-test", "test2", 7, 
new Next() {
+                assertStatisticsGet(assertions, stat2, "gnj-test", "test1", 5, 
new Next() {
                     @Override
                     public void next() {
-                        assertStatisticsGet(assertions, stat2, "gnj-test", 
"test3", 4, new Next() {
+                        assertStatisticsGet(assertions, stat2, "gnj-test", 
"test2", 7, new Next() {
                             @Override
                             public void next() {
-                                stat2.destroy();
-                                System.out.println("destroy called");
+                                assertStatisticsGet(assertions, stat2, 
"gnj-test", "test3", 4, new Next() {
+                                    @Override
+                                    public void next() {
+                                        stat2.destroy();
+                                        System.out.println("destroy called");
+                                    }
+                                });
                             }
                         });
+
                     }
                 });
 
             }
         });
 
+
         Scheduler.run();
 
         assertions.assertAll();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]