Kaynağa Gözat

Increase server_test OSL seed period
- decrease the chance of a period rollover
during a test case run, in which case more
SLOKs than expected will be issued

Rod Hynes 9 yıl önce
ebeveyn
işleme
03e0835b8e
1 değiştirilmiş dosya ile 3 ekleme ve 3 silme
  1. 3 3
      psiphon/server/server_test.go

+ 3 - 3
psiphon/server/server_test.go

@@ -913,7 +913,7 @@ func paveOSLConfigFile(t *testing.T, oslConfigFilename string) string {
             }
             }
           ],
           ],
           "SeedSpecThreshold" : 2,
           "SeedSpecThreshold" : 2,
-          "SeedPeriodNanoseconds" : 10000000000,
+          "SeedPeriodNanoseconds" : 3600000000000,
           "SeedPeriodKeySplits": [
           "SeedPeriodKeySplits": [
             {
             {
               "Total": 2,
               "Total": 2,
@@ -939,7 +939,7 @@ func paveOSLConfigFile(t *testing.T, oslConfigFilename string) string {
             }
             }
           ],
           ],
           "SeedSpecThreshold" : 1,
           "SeedSpecThreshold" : 1,
-          "SeedPeriodNanoseconds" : 10000000000,
+          "SeedPeriodNanoseconds" : 3600000000000,
           "SeedPeriodKeySplits": [
           "SeedPeriodKeySplits": [
             {
             {
               "Total": 1,
               "Total": 1,
@@ -954,7 +954,7 @@ func paveOSLConfigFile(t *testing.T, oslConfigFilename string) string {
 	propagationChannelID, _ := common.MakeRandomStringHex(8)
 	propagationChannelID, _ := common.MakeRandomStringHex(8)
 
 
 	now := time.Now().UTC()
 	now := time.Now().UTC()
-	epoch := now.Truncate(10 * time.Second)
+	epoch := now.Truncate(1 * time.Hour)
 	epochStr := epoch.Format(time.RFC3339Nano)
 	epochStr := epoch.Format(time.RFC3339Nano)
 
 
 	oslConfigJSON := fmt.Sprintf(
 	oslConfigJSON := fmt.Sprintf(