Remove quota disabling, it didn't have much of an effect.
This commit is contained in:
parent
84542dd808
commit
e38d4c1e48
|
@ -1 +1 @@
|
|||
Subproject commit bec35b4c27ec10fe31dc07f9d42d8bda426b8535
|
||||
Subproject commit b28dbd549284cf450be7f25ad85aadf614d08f0b
|
|
@ -177,7 +177,6 @@ if (descriptions.length) {
|
|||
}
|
||||
|
||||
async function expectRowUsage(expected: number, f: () => Promise<void>) {
|
||||
return await quotas.withEnabled(async () => {
|
||||
const before = await getRowUsage()
|
||||
await f()
|
||||
const after = await getRowUsage()
|
||||
|
@ -198,7 +197,6 @@ if (descriptions.length) {
|
|||
expect(usage).toBeGreaterThan(expected * 0.9)
|
||||
expect(usage).toBeLessThan(expected * 1.1)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const defaultRowFields = isInternal
|
||||
|
|
|
@ -2830,14 +2830,12 @@ if (descriptions.length) {
|
|||
expected: number,
|
||||
f: () => Promise<T>
|
||||
): Promise<T> {
|
||||
return await quotas.withEnabled(async () => {
|
||||
const before = await getRowUsage()
|
||||
const result = await f()
|
||||
const after = await getRowUsage()
|
||||
const usage = after - before
|
||||
expect(usage).toBe(expected)
|
||||
return result
|
||||
})
|
||||
}
|
||||
|
||||
it("should be able to delete a row", async () => {
|
||||
|
|
|
@ -44,13 +44,11 @@ describe("test the openai action", () => {
|
|||
}
|
||||
|
||||
const expectAIUsage = async <T>(expected: number, f: () => Promise<T>) => {
|
||||
return await quotas.withEnabled(async () => {
|
||||
const before = await getAIUsage()
|
||||
const result = await f()
|
||||
const after = await getAIUsage()
|
||||
expect(after - before).toEqual(expected)
|
||||
return result
|
||||
})
|
||||
}
|
||||
|
||||
it("should be able to receive a response from ChatGPT given a prompt", async () => {
|
||||
|
|
Loading…
Reference in New Issue