```\nit('panprog global-local desync', async () => {\n    const positionMaker = parse6decimal('2.000')\n    const positionLong = parse6decimal('1.000')\n    const collateral = parse6decimal('100')\n\n    const oracleVersion = {\n        price: parse6decimal('100'),\n        timestamp: TIMESTAMP,\n        valid: true,\n    }\n    oracle.at.whenCalledWith(oracleVersion.timestamp).returns(oracleVersion)\n    oracle.status.returns([oracleVersion, oracleVersion.timestamp + 100])\n    oracle.request.returns()\n\n    dsu.transferFrom.whenCalledWith(userB.address, market.address, collateral.mul(1e12)).returns(true)\n    await market.connect(userB).update(userB.address, positionMaker, 0, 0, collateral, false)\n\n    const oracleVersion2 = {\n        price: parse6decimal('100'),\n        timestamp: TIMESTAMP + 100,\n        valid: true,\n    }\n    oracle.at.whenCalledWith(oracleVersion2.timestamp).returns(oracleVersion2)\n    oracle.status.returns([oracleVersion2, oracleVersion2.timestamp + 100])\n    oracle.request.returns()\n\n    dsu.transferFrom.whenCalledWith(user.address, market.address, collateral.mul(1e12)).returns(true)\n    await market.connect(user).update(user.address, 0, positionLong, 0, collateral, false)\n\n    var info = await market.locals(userB.address);\n    console.log("collateral deposit maker: " + info.collateral);\n    var info = await market.locals(user.address);\n    console.log("collateral deposit long: " + info.collateral);\n\n    // invalid oracle version\n    const oracleVersion3 = {\n        price: 0,\n        timestamp: TIMESTAMP + 200,\n        valid: false,\n    }\n    oracle.at.whenCalledWith(oracleVersion3.timestamp).returns(oracleVersion3)\n\n    // next oracle version is valid\n    const oracleVersion4 = {\n        price: parse6decimal('100'),\n        timestamp: TIMESTAMP + 300,\n        valid: true,\n    }\n    oracle.at.whenCalledWith(oracleVersion4.timestamp).returns(oracleVersion4)\n\n    // still returns oracleVersion2, because nothing commited for version 3, and version 4 time has passed but not yet commited\n    oracle.status.returns([oracleVersion2, oracleVersion4.timestamp + 100])\n    oracle.request.returns()\n\n    // reset to 0\n    await market.connect(user).update(user.address, 0, 0, 0, 0, false)\n\n    // oracleVersion4 commited\n    oracle.status.returns([oracleVersion4, oracleVersion4.timestamp + 100])\n    oracle.request.returns()\n\n    // settle\n    await market.connect(userB).update(userB.address, positionMaker, 0, 0, 0, false)\n\n    const oracleVersion5 = {\n        price: parse6decimal('90'),\n        timestamp: TIMESTAMP + 400,\n        valid: true,\n    }\n    oracle.at.whenCalledWith(oracleVersion5.timestamp).returns(oracleVersion5)\n    oracle.status.returns([oracleVersion5, oracleVersion5.timestamp + 100])\n    oracle.request.returns()\n\n    // settle\n    await market.connect(userB).update(userB.address, positionMaker, 0, 0, 0, false)\n    await market.connect(user).update(user.address, 0, 0, 0, 0, false)\n\n    var info = await market.locals(userB.address);\n    console.log("collateral maker: " + info.collateral);\n    var info = await market.locals(user.address);\n    console.log("collateral long: " + info.collateral);\n})\n```\n