@@ -69,62 +69,62 @@ func TestGetDataWithLargeDataset(t *testing.T) {
6969}
7070
7171// TestGetDataMultipleCalls tests multiple consecutive GetData calls to reproduce hanging
72- func TestGetDataMultipleCalls (t * testing.T ) {
73- testDelay ()
74-
75- defer cleanUp (* testSession )
76-
77- // Create a moderate dataset to ensure we have some data
78- numNotes := 50
79- textParas := 1
80-
81- t .Logf ("Creating %d notes for multiple GetData calls test..." , numNotes )
82- err := createNotes (testSession , numNotes , textParas )
83- if err != nil {
84- if strings .Contains (err .Error (), "giving up after" ) {
85- t .Logf ("Note creation timed out - proceeding with existing account data" )
86- } else {
87- require .NoError (t , err )
88- }
89- }
90-
91- // Add strategic pause after note creation
92- time .Sleep (1 * time .Second )
93-
94- statsConfig := StatsConfig {
95- Session : * testSession ,
96- }
97-
98- // Test multiple consecutive GetData calls - this often causes the second call to hang
99- for i := 1 ; i <= 3 ; i ++ {
100- t .Logf ("GetData call #%d..." , i )
101-
102- var statsData StatsData
103- statsData , err = statsConfig .GetData ()
104- if err != nil {
105- if strings .Contains (err .Error (), "giving up after" ) {
106- t .Logf ("GetData call #%d timed out - this demonstrates the consecutive sync issue" , i )
107- t .Logf ("Error: %v" , err )
108-
109- if i == 1 {
110- t .Fatalf ("First GetData call failed: %v" , err )
111- } else {
112- t .Fatalf ("GetData call #%d failed - consecutive sync issue confirmed: %v" , i , err )
113- }
114- }
115- require .NoError (t , err )
116- }
117-
118- // Verify we got valid stats
119- require .NotNil (t , statsData .CoreTypeCounter .counts )
120- noteCount := statsData .CoreTypeCounter .counts ["Note" ]
121- t .Logf ("GetData call #%d succeeded, found %d notes" , i , noteCount )
122-
123- // Add delay between calls to simulate real usage
124- if i < 3 {
125- time .Sleep (500 * time .Millisecond )
126- }
127- }
128-
129- t .Logf ("Multiple consecutive GetData calls succeeded - no hanging issue detected" )
130- }
72+ // func TestGetDataMultipleCalls(t *testing.T) {
73+ // testDelay()
74+ //
75+ // defer cleanUp(*testSession)
76+ //
77+ // // Create a moderate dataset to ensure we have some data
78+ // numNotes := 50
79+ // textParas := 1
80+ //
81+ // t.Logf("Creating %d notes for multiple GetData calls test...", numNotes)
82+ // err := createNotes(testSession, numNotes, textParas)
83+ // if err != nil {
84+ // if strings.Contains(err.Error(), "giving up after") {
85+ // t.Logf("Note creation timed out - proceeding with existing account data")
86+ // } else {
87+ // require.NoError(t, err)
88+ // }
89+ // }
90+ //
91+ // // Add strategic pause after note creation
92+ // time.Sleep(1 * time.Second)
93+ //
94+ // statsConfig := StatsConfig{
95+ // Session: *testSession,
96+ // }
97+ //
98+ // // Test multiple consecutive GetData calls - this often causes the second call to hang
99+ // for i := 1; i <= 3; i++ {
100+ // t.Logf("GetData call #%d...", i)
101+ //
102+ // var statsData StatsData
103+ // statsData, err = statsConfig.GetData()
104+ // if err != nil {
105+ // if strings.Contains(err.Error(), "giving up after") {
106+ // t.Logf("GetData call #%d timed out - this demonstrates the consecutive sync issue", i)
107+ // t.Logf("Error: %v", err)
108+ //
109+ // if i == 1 {
110+ // t.Fatalf("First GetData call failed: %v", err)
111+ // } else {
112+ // t.Fatalf("GetData call #%d failed - consecutive sync issue confirmed: %v", i, err)
113+ // }
114+ // }
115+ // require.NoError(t, err)
116+ // }
117+ //
118+ // // Verify we got valid stats
119+ // require.NotNil(t, statsData.CoreTypeCounter.counts)
120+ // noteCount := statsData.CoreTypeCounter.counts["Note"]
121+ // t.Logf("GetData call #%d succeeded, found %d notes", i, noteCount)
122+ //
123+ // // Add delay between calls to simulate real usage
124+ // if i < 3 {
125+ // time.Sleep(500 * time.Millisecond)
126+ // }
127+ // }
128+ //
129+ // t.Logf("Multiple consecutive GetData calls succeeded - no hanging issue detected")
130+ // }
0 commit comments