mirror of
				https://github.com/gofiber/storage.git
				synced 2025-10-30 11:16:33 +08:00 
			
		
		
		
	chore: check the key expired
Proposed by coderabbit
This commit is contained in:
		| @@ -119,6 +119,10 @@ func Test_MongoDB_Set_Expiration(t *testing.T) { | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	time.Sleep(1100 * time.Millisecond) | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result), "Key should have expired") | ||||
| } | ||||
|  | ||||
| func Test_MongoDB_Get_Expired(t *testing.T) { | ||||
|   | ||||
| @@ -115,6 +115,10 @@ func Test_Postgres_Set_Expiration(t *testing.T) { | ||||
| 	require.NoError(t, err) | ||||
|  | ||||
| 	time.Sleep(1100 * time.Millisecond) | ||||
|  | ||||
| 	result, err := testStore.Get(key) | ||||
| 	require.NoError(t, err) | ||||
| 	require.Zero(t, len(result), "Key should have expired") | ||||
| } | ||||
|  | ||||
| func Test_Postgres_Get_Expired(t *testing.T) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Manuel de la Peña
					Manuel de la Peña