Browse Source

Fix unreliable test check

Rod Hynes 1 month ago
parent
commit
5ac833b3c6
1 changed files with 5 additions and 6 deletions
  1. 5 6
      psiphon/server/server_test.go

+ 5 - 6
psiphon/server/server_test.go

@@ -2004,13 +2004,12 @@ func runServer(t *testing.T, runConfig *runServerConfig) {
 
 			case "InproxyProxyTotalActivity":
 
-				// This assumes that both non-zero bytes up and down are
-				// reported in at least same notice, although there's some
-				// unlikely chance it's only one or the other.
+				// Bytes aren't checked here since there's a chance that the
+				// last infrequent InproxyProxyTotalActivity notice is posted
+				// before any upstream relay.
+
 				connectedClients := int(payload["connectedClients"].(float64))
-				bytesUp := int(payload["totalBytesUp"].(float64))
-				bytesDown := int(payload["totalBytesDown"].(float64))
-				if connectedClients == 1 && bytesUp > 0 && bytesDown > 0 {
+				if connectedClients == 1 {
 					sendNotificationReceived(inproxyActivity)
 				}