Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #2 is flaky #423

Closed
dduugg opened this issue Feb 17, 2015 · 1 comment
Closed

test #2 is flaky #423

dduugg opened this issue Feb 17, 2015 · 1 comment

Comments

@dduugg
Copy link
Contributor

dduugg commented Feb 17, 2015

Travis often fails when running test #2. Example here.

Interestingly, running the same test in succession can produce inconsistent results. In this commit, I duplicated the flaky test (compare lines 30-39 with lines 41-50). Travis failed the first test but passed the second.

@bewest
Copy link
Member

bewest commented Feb 17, 2015

Hmmm, excellent contrast.

In your reproduction, here's the diff between results of the first unsuccessful run to the second successful run.

diff -u first.json second.js

--- first.json  2015-02-16 23:20:34.456660143 -0800
+++ second.json 2015-02-16 23:21:04.400406730 -0800
@@ -15,6 +15,21 @@
     device: 'dexcom',
     direction: 'NOT COMPUTABLE' },
   { sgv: '5',
+    dateString: '07/19/2014 10:34:15 AM',
+    date: 1405791255000,
+    device: 'dexcom',
+    direction: 'NOT COMPUTABLE' },
+  { sgv: '5',
+    dateString: '07/19/2014 10:29:15 AM',
+    date: 1405790955000,
+    device: 'dexcom',
+    direction: 'NOT COMPUTABLE' },
+  { sgv: '5',
+    dateString: '07/19/2014 10:24:15 AM',
+    date: 1405790655000,
+    device: 'dexcom',
+    direction: 'NOT COMPUTABLE' },
+  { sgv: '5',
     dateString: '07/19/2014 10:19:15 AM',
     date: 1405790355000,
     device: 'dexcom',
@@ -24,14 +39,14 @@
     date: 1405790055000,
     device: 'dexcom',
     direction: 'NOT COMPUTABLE' },
-  { sgv: '178',
-    dateString: '07/19/2014 03:59:15 AM',
-    date: 1405767555000,
-    device: 'dexcom',
-    direction: 'Flat' },
-  { sgv: '176',
-    dateString: '07/19/2014 03:34:15 AM',
-    date: 1405766055000,
+  { sgv: '5',
+    dateString: '07/19/2014 10:09:15 AM',
+    date: 1405789755000,
+    device: 'dexcom',
+    direction: 'NOT COMPUTABLE' },
+  { sgv: '5',
+    dateString: '07/19/2014 10:04:15 AM',
+    date: 1405789455000,
     device: 'dexcom',
-    direction: 'Flat' } ]
+    direction: 'NOT COMPUTABLE' } ]

Not sure what is happening there...

dduugg added a commit to dduugg/cgm-remote-monitor that referenced this issue Feb 18, 2015
dduugg added a commit to dduugg/cgm-remote-monitor that referenced this issue Mar 1, 2015
dduugg added a commit to dduugg/cgm-remote-monitor that referenced this issue Mar 1, 2015
Resolves nightscout#423. Also changes the callback signature, invoking it with the
error and docs, rather than the error, totalCreated, and docs. The third
paramter isn't used, and the second parameter should be an array. (Since
totalCreated was 0 on callback, it was falsy and replaced with an empty
array when used in format_entries.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants